Commit Graph

102 Commits

Author SHA1 Message Date
Dominic Hamon
71c41cde57 Introduce CSV reporter 2015-03-27 14:07:23 -07:00
Eric Fiselier
9ed1082c33 Merge branch 'master' into new-benchmark-interface 2015-03-27 16:36:40 -04:00
Eric Fiselier
e428b9eec3 Add 'benchmark::DoNotOptimize(...)' to help users prevent optimizations 2015-03-27 16:35:46 -04:00
Eric Fiselier
4f9ce87e8c Merge branch 'master' into new-benchmark-interface 2015-03-27 16:26:36 -04:00
Eric Fiselier
4bf6ceb50d Change the available benchmark options 2015-03-26 23:37:26 -04:00
Eric Fiselier
75712367c1 update names 2015-03-18 22:49:09 -04:00
Eric Fiselier
e96f068a1d rename BENCHMARK_PRIVATE_NAME to BENCHMARK_PRIVATE_CONCAT 2015-03-18 19:19:17 -04:00
Eric Fiselier
3bf0b251a3 remove whitespace 2015-03-18 18:35:36 -04:00
Eric Fiselier
035a0ba2b3 fix macro names and use __COUNTER__ 2015-03-18 18:34:30 -04:00
Eric Fiselier
38066e8bdc Add variadic macro for BENCHMARK_TEMPLATE in c++11 and beyond. 2015-03-18 14:50:50 -04:00
Eric Fiselier
01bba479ac Remove use of reserved names in benchmark macros 2015-03-18 14:50:16 -04:00
Eric Fiselier
a6a90ec6b8 Revert "Add BENCHMARK_TEMPLATE1 macro"
I didn't mean to commit this to master.
This reverts commit b7d03ac4f5.
2015-03-18 14:43:08 -04:00
Eric Fiselier
b7d03ac4f5 Add BENCHMARK_TEMPLATE1 macro 2015-03-18 14:42:35 -04:00
Eric Fiselier
6429348e0d address review comments and fix array type declaration 2015-03-18 00:23:43 -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
8e72846da4 rename minimal_benchmark.h and fix recursive include in benchmark_api.h 2015-03-17 14:01:04 -04:00
Eric Fiselier
df904a1980 add include to minimal_benchmark.h 2015-03-17 13:58:25 -04:00
Eric Fiselier
35f9de71ee move to using C headers in minimal_benchmark.h to prevent getting any C++ STL headers 2015-03-17 13:51:04 -04:00
Eric Fiselier
4242f2f1d7 move reporter internals in both headers and source 2015-03-17 13:46:16 -04:00
Eric Fiselier
1924b30a6c Merge null pointer warnings 2015-03-17 12:21:20 -04:00
Eric Fiselier
64ba272911 Enable zero as NULL warnings and fix all occurences 2015-03-12 19:16:06 -04:00
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
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
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
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
373cc41100 C++11 concurrency instead of pthread 2014-08-06 10:50:21 -07:00
Paul Redmond
0ce150e1fc fix examples to use SetBytesProcessed
- use State::SetBytesProcessed not SetBenchmarkBytesProcessed
2014-07-23 13:42:04 -04:00
pleroy
ec1e09f939 Ignore the CPU time consumed when timing is paused.
Conflicts:
	src/benchmark.cc
2014-05-29 16:01:11 +02:00
Chris Kennelly
9f27edbb16 Resolve memory leak from benchmark instances in google/benchmark#17.
This shifts registration from a global vector to a singleton that manages
benchmark destruction during shutdown.
2014-04-23 01:17:47 -07:00
Chris Kennelly
9b5ece6ece Include stddef.h for size_t. 2014-04-22 20:07:57 -07:00
Dominic Hamon
7b0fa3e1fa Merge branch 'master' of https://github.com/google/benchmark 2014-01-15 12:14:05 -08:00
Dominic Hamon
4e21f5e180 Add explicit pthread.h include 2014-01-15 12:13:46 -08:00
Dominic Hamon
77cd9803ce add pedantic errors and fix them 2014-01-10 15:07:04 -08:00
Dominic Hamon
5a71bd6e66 More formatting tweaks 2014-01-09 12:19:02 -08:00
Dominic Hamon
78fa0b93ab Merged with upstream 2014-01-09 12:16:51 -08:00
Dominic Hamon
4ce184d86d Code reformat 2014-01-09 12:12:11 -08:00
Dominic Hamon
577f7410d1 Explicitly remove unsupported memory usage support 2014-01-08 09:11:50 -08:00
Dominic Hamon
acc65f48d3 Allow custom reporters 2014-01-07 16:33:40 -08:00
Dominic Hamon
2923a481ed Multithreaded tests are reenabled 2014-01-07 13:15:26 -08:00
Dominic Hamon
15bf66750c Really drop multithreading support 2013-12-20 15:10:46 -08:00
Dominic Hamon
06c1fdbdb3 Update documentation and remove 'Threads' until threadedness works 2013-12-20 15:05:16 -08:00
Dominic Hamon
b3f0d71e50 benchmark_min_time now works as expected 2013-12-19 17:16:40 -08:00
Dominic Hamon
e390e4ebc3 Adding benchmark namespace and removing broken flags 2013-12-19 16:18:09 -08:00
Dominic Hamon
403f354423 Initial commit
Benchmark library builds and runs but only single-threaded. Multithreaded
support needs a bit more love.

Currently requires some C++11 support (g++ 4.6.3 seems to work).
2013-12-18 16:58:23 -08:00