Commit Graph

105 Commits

Author SHA1 Message Date
Eric Fiselier
4f9ce87e8c Merge branch 'master' into new-benchmark-interface 2015-03-27 16:26:36 -04:00
Eric Fiselier
c5f238b18c Fix column width calculation and remove duplicate test 2015-03-27 12:28:22 -04:00
Eric Fiselier
cfa3e181ab Make DateTimeString part of the internal implementation 2015-03-27 12:13:02 -04:00
Eric Fiselier
4bf6ceb50d Change the available benchmark options 2015-03-26 23:37:26 -04:00
Eric Fiselier
b07fee6b64 address review comments 2015-03-26 18:32:31 -04:00
Eric Fiselier
1b9e55c281 Remove walltime implementation tests and expose less internals 2015-03-26 17:56:27 -04:00
Eric Fiselier
d3e0671a87 finish selection of clock with debug information 2015-03-26 17:52:28 -04:00
Eric Fiselier
48c4c9cf50 Revert "prevent unneeded calculation of Slow()"
The calculation was actually inside the loop for a reason.

This reverts commit 47442b9054.
2015-03-26 16:22:29 -04:00
Eric Fiselier
47442b9054 prevent unneeded calculation of Slow() 2015-03-26 16:01:29 -04:00
Eric Fiselier
725f1f066d add walltime benchmark and fix unused variable. 2015-03-26 14:56:52 -04:00
Eric Fiselier
d0df7ef2de cleanup whitespace and includes 2015-03-26 14:30:16 -04:00
Eric Fiselier
a3308c6d86 Introduce use of std::chrono and remove Walltime printing 2015-03-26 14:26:07 -04:00
Eric Fiselier
92fc9b99b2 Add newline after every benchmark to improve readability of the json output. 2015-03-18 12:09:18 -04:00
Eric Fiselier
6429348e0d address review comments and fix array type declaration 2015-03-18 00:23:43 -04:00
Eric Fiselier
ffb67dcabf address review comments 2015-03-17 18:42:41 -04:00
Eric Fiselier
f65da9d581 add json reporter 2015-03-17 18:18:06 -04:00
Eric Fiselier
20f1c0e2a8 Apply reporter interface changes. Make report methods non-const and add a Finalize method. 2015-03-17 16:16:36 -04:00
Eric Fiselier
e45252e6f5 move ConsoleReporter out of internal namespace 2015-03-17 14:15:16 -04:00
Eric Fiselier
4242f2f1d7 move reporter internals in both headers and source 2015-03-17 13:46:16 -04:00
Eric Fiselier
7f2ef46255 merge master 2015-03-17 12:35:11 -04:00
Eric Fiselier
1924b30a6c Merge null pointer warnings 2015-03-17 12:21:20 -04:00
Eric Fiselier
66bf7c8f71 add floating point comparison warnings 2015-03-12 20:27:29 -04:00
Eric Fiselier
180981716b replace instances of NULL with nullptr 2015-03-12 19:32:50 -04:00
Eric Fiselier
64ba272911 Enable zero as NULL warnings and fix all occurences 2015-03-12 19:16:06 -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
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
75686a8f22 remove forward declarations 2015-03-09 18:00:04 -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
a187aa0803 Third step in moving towards adopting new timer semantics 2015-03-06 17:01:05 -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
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
Pavel Davydov
c8d05fcc96 Fix #77 build on FreeBSD 10 2015-02-21 17:05:13 +03: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
Dominic Hamon
3968ff45ba Fix #72 by avoiding 64-to-32-bit shortenings 2015-02-18 11:18:40 -08:00
Dominic Hamon
a3b5e44c52 Remove CHECK_* from public API.
CHECK_* are now private and used internally in the library. The test
uses have been replaced with asserts.

Fixes #62.
2014-10-31 21:54:55 -07:00
x.zhou
4a3348ce22 Turn the global mutex into instance variables
To fix #52
2014-10-12 18:01:45 +08:00
Matt Clarkson
f043826542 C++11 regular expressions 2014-08-22 14:55:46 +01:00
Matt Clarkson
fac16a662e CMakeLists.txt comments 2014-08-20 08:42:30 +01:00