Commit Graph

1565 Commits

Author SHA1 Message Date
Eric Fiselier 47fa9ba1a3 merge 2015-03-12 18:56:36 -04:00
Eric Fiselier 19464f7dab Fix includes in benchmark.h 2015-03-12 18:56:07 -04:00
Eric Fiselier 2b34b5d937 remove unneeded includes 2015-03-12 18:45:52 -04:00
Eric Fiselier 937987b63d pimpl benchmark 2015-03-12 18:40:34 -04:00
Eric Fiselier 7a767012f1 Adopt new benchmark timing internals.
This patch adopts a new internal structure for how timings are performed.
Currently every iteration of a benchmark checks to see if it has been running
for an appropriate amount of time. Checking the clock introduces noise into
the timings and this can cause inconsistent output from each benchmark.

Now every iteration of a benchmark only checks an iteration count to see if it
should stop running. The iteration count is determined before hand by testing
the benchmark on a series of increasing iteration counts until a suitable count
is found. This increases the amount of time it takes to run the actual benchmarks
but it also greatly increases the accuracy of the results.

This patch introduces some breaking changes. The notable breaking changes are:
1. Benchmarks run on multiple threads no generate a report per thread. Instead
   only a single report is generated.
2. ::benchmark::UseRealTime() was removed and replaced with State::UseRealTime().
2015-03-12 18:03:33 -04:00
Eric 7c6a7e3084 Merge pull request #90 from google/userealtime
Enable UseRealTime and fix documentation for SetLabel.
2015-03-11 13:30:28 -04:00
Dominic Hamon d68127d8ad Enable UseRealTime and fix documentation for SetLabel.
Fixes #89

UseRealTime was defined in the internal namespace by mistake.
Similarly, documentation suggested that benchmark::SetLabel should be
used to set a label, and a function was declared but not defined, while
actually the call should be 'state.SetLabel'.
2015-03-11 09:47:15 -07:00
Eric Fiselier e975efdb7a remove third_party directory. update test args 2015-03-10 14:38:45 -04:00
Eric e2c795520c Merge pull request #87 from google/filter_test
Add filter test, remove re test, and googletest deps
2015-03-10 14:32:58 -04:00
Dominic Hamon 3b40f0a7a3 Add filter test, remove re test, and googletest deps 2015-03-09 20:30:14 -07:00
Eric 522a58916a Merge pull request #85 from google/upgrade-step3
Step three towards moving timer changes.
2015-03-09 18:49:52 -04:00
Eric Fiselier 75686a8f22 remove forward declarations 2015-03-09 18:00:04 -04:00
Eric 4b3bbe343a Merge pull request #84 from google/upgrade-step2
Step two towards merging timer changes.
2015-03-09 16:39:03 -04:00
Eric Fiselier 60e26b7022 fix missing newline and header guard name 2015-03-09 16:18:10 -04:00
Eric Fiselier 5cfd6bcc14 update more copyright 2015-03-09 16:15:05 -04:00
Eric Fiselier 8f5cd9760f Merge branch 'upgrade-step2' into upgrade-step3 2015-03-09 16:03:06 -04:00
Eric Fiselier d20cdf19ca address comments 2015-03-09 15:48:51 -04:00
Eric Fiselier e60561a779 Force static initialization of walltime. 2015-03-09 14:56:47 -04:00
Eric Fiselier 8cf7b18ae4 Merge branch 'master' into upgrade-step2 2015-03-09 14:49:00 -04:00
Eric 61f05062e8 Merge pull request #81 from google/upgrade-step1
Step one towards merging timer changes.
2015-03-09 14:48:32 -04:00
Eric Fiselier 5b0542d583 Merge branch 'upgrade-step1' into upgrade-step2 2015-03-09 14:43:45 -04:00
Eric Fiselier e447887d16 Fix travis config by moving CTEST_OUTPUT_ON_FAILURE=1 into make test command 2015-03-09 14:40:08 -04:00
Eric Fiselier 6590ceab74 Merge branch 'upgrade-step1' into upgrade-step2 2015-03-09 14:34:44 -04:00
Eric Fiselier f7602badfb add env to make ctest print on failure 2015-03-09 14:34:32 -04:00
Eric Fiselier a187aa0803 Third step in moving towards adopting new timer semantics 2015-03-06 17:01:05 -05:00
Eric Fiselier f947cebe15 remove ifdefs around BM_Factorial 2015-03-06 16:59:32 -05:00
Eric Fiselier 8f96f50553 comment out test to prevent failures. 2015-03-06 16:53:52 -05:00
Eric Fiselier f1c398adb4 invert check in GetLogInstanceForLevel() 2015-03-06 14:19:06 -05:00
Eric Fiselier 8ed7d7664b The second step towards merging the timer changes.
This patch does two things:

1. It overhalls the static initialization in Walltime to be simplier. It uses
   a static variable inside WallTime::Now() to initialize the timer.

2. Add a logging mechanism so that the -v flag actually has meaning and
   reimplement the CHECK macros to allow extra messages to be streamed in.
2015-03-06 14:07:24 -05:00
Eric Fiselier b1f34d3880 address comments 2015-03-06 13:20:47 -05:00
Eric Fiselier 5b41e128b3 Step one towards merging timer changes.
This patch cleans up our use of generic macros and also merges changes in the
build system.

It adds options -DBENCHMARK_ENABLE_TESTING and -DBENCHMARK_ENABLE_SHARED.
2015-03-06 12:35:00 -05:00
Eric Fiselier c5a362b4d3 Change std::regex detection test to detect bug in libstdc++.
libstdc++'s std::regex has (or had) a bug in std::regex::operator=(...) that
caused undefined behaviour. Clang will detect this and compile the function so
that it crashes at runtime. This patch tried to detect that bug during
configuration.
2015-03-06 12:05:19 -05:00
Eric 056a008afa Merge pull request #75 from google/outofsource
Add _build to gitignore to enable out-of-source builds
2015-03-02 20:29:21 +01:00
Eric cff940a727 Merge pull request #78 from pdavydov108/master
Fix #77 build on freebsd 10
2015-03-02 20:10:20 +01:00
Eric 5e77de62a1 Merge pull request #76 from google/64-32
One more 64-bit to 32-bit conversion
2015-03-02 17:47:02 +01:00
Pavel Davydov 8e3e78fc3d Fix #77 add comment to headers in wrong order 2015-02-25 10:41:26 +03:00
Dominic Hamon 5fe797b6f9 Add top-level folders to gitignore to enable out-of-source builds 2015-02-21 15:00:06 -08:00
Pavel Davydov 26c01ee9ab Fix #77 add FreeBSD detection in cmake 2015-02-21 17:23:20 +03:00
Pavel Davydov c8d05fcc96 Fix #77 build on FreeBSD 10 2015-02-21 17:05:13 +03:00
Eric Fiselier 114886100b Don't use c++14 2015-02-19 16:38:30 -05:00
Eric Fiselier 9a11834048 add includes for stdint.h 2015-02-19 16:37:05 -05:00
Dominic Hamon 2789aba1ce One more 64-bit to 32-bit conversion 2015-02-18 22:21:39 -08:00
Eric 55285fd2ae Merge pull request #73 from google/64.32
Fix #72 by avoiding 64-to-32-bit shortenings
2015-02-18 16:39:24 -05:00
Dominic Hamon 3968ff45ba Fix #72 by avoiding 64-to-32-bit shortenings 2015-02-18 11:18:40 -08:00
Dominic Hamon fd7d288bbe Add section on linking to satisfy #67 2014-12-26 08:44:14 -08:00
Dominic Hamon b40b66ab3b Actually fix issue with CHECK 2014-12-02 12:58:14 -08:00
Dominic Hamon d31977bb69 Added gtest CHECK symbol to benchmark test 2014-12-02 12:51:46 -08:00
Dominic Hamon 2aa2442024 Remove drone.io reference 2014-12-02 12:46:27 -08:00
Dominic Hamon d58d59588f Merge pull request #66 from 3Hren/master
Using Travis CI.
2014-11-14 14:19:16 -08:00
Evgeny Safronov 1bc73789e4 Update AUTHORS and CONTRIBUTORS. 2014-11-14 23:39:38 +04:00