Commit Graph

56 Commits

Author SHA1 Message Date
Eric Fiselier
9c25a67c1a address more review comments 2015-04-06 19:04:12 -04:00
Eric Fiselier
12f4405870 add ability to use benchmark filters 2015-04-06 17:00:06 -04:00
Eric Fiselier
e97a96f9e7 redo filter test 2015-03-31 00:05:02 -04:00
Eric Fiselier
9d47552020 merge new changes in basic_test.cc 2015-03-27 16:37:53 -04: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
c5f238b18c Fix column width calculation and remove duplicate test 2015-03-27 12:28:22 -04:00
Eric Fiselier
4bf6ceb50d Change the available benchmark options 2015-03-26 23:37:26 -04:00
Eric Fiselier
1b9e55c281 Remove walltime implementation tests and expose less internals 2015-03-26 17:56:27 -04:00
Eric Fiselier
21207a4df5 improve walltime test 2015-03-26 15:25:08 -04:00
Eric Fiselier
c0755c4226 actually add new test 2015-03-26 14:57:03 -04:00
Eric Fiselier
725f1f066d add walltime benchmark and fix unused variable. 2015-03-26 14:56:52 -04:00
Eric Fiselier
be993acbb3 remove unneeded test repetitions 2015-03-26 14:33:48 -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
482c19d92e Handle creation of C++03 flags differently 2015-03-18 17:08:15 -04:00
Eric Fiselier
d40cb97713 Don't treat CMAKE_CXX_FLAGS as a list 2015-03-18 17:05:53 -04:00
Eric Fiselier
daa8a67aa5 add C++03 test and update README 2015-03-18 16:34:43 -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
d71660227b fix minimal_benchmark.h include 2015-03-17 14:02:02 -04:00
Eric Fiselier
ef79d0af9f move basic_test over to minimal benchmark 2015-03-17 13:48:33 -04:00
Eric Fiselier
279e502a05 add test for benchmark with two template parameters 2015-03-17 13:32:20 -04:00
Eric Fiselier
efe591015d address review comments 2015-03-17 12:31:46 -04:00
Eric Fiselier
66bf7c8f71 add floating point comparison warnings 2015-03-12 20:27:29 -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
e975efdb7a remove third_party directory. update test args 2015-03-10 14:38:45 -04:00
Dominic Hamon
3b40f0a7a3 Add filter test, remove re test, and googletest deps 2015-03-09 20:30:14 -07: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
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
Dominic Hamon
3968ff45ba Fix #72 by avoiding 64-to-32-bit shortenings 2015-02-18 11:18:40 -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
Lei Xu
0f78cebba5 Use #ifdef to protect calling Factorial in benchmark_test.cc 2014-11-13 16:09:21 -08:00
Dominic Hamon
7e290fb965 Fix release builds 2014-11-13 13:12:28 -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
Niklas Hofmann
b04211cc88 Merge branch 'master' of github.com:google/benchmark 2014-10-25 18:35:35 +02:00
Niklas Hofmann
3e9264dcf1 added googletest dependency to tests (allows compilation with -j) 2014-10-16 19:17:08 +02:00
Dominic Hamon
a13627bc3a Move pthread dependency to test CMakeLists.txt 2014-10-11 14:57:45 -07:00
Matt Clarkson
0fd0be9789 Added more complicated regex test patterns 2014-08-22 14:55:46 +01:00
Matt Clarkson
1176936966 Check the number of benchmark tests ran
Previously the benchmark_test program executed the benchmark tests to make sure
the API was working but was not checking the number of tests that were
completed. If the regular expression matching breaks, zero tests could be ran.
Similarly, if one of the APIs breaks and doesn't run the correct amount of tests
then `make test` will catch this.
2014-08-15 11:09:23 +01:00
Matt Clarkson
373cc41100 C++11 concurrency instead of pthread 2014-08-06 10:50:21 -07:00
Paul Redmond
52b3004ae3 fix linker error by reordering link libraries 2014-07-23 10:35:42 -04:00
Chris Kennelly
fa908926c7 Partially resolve google/benchmark#17 by fixing regular expression leak.
This adds a unit test to validate the wrapper without running the entirety of
benchmark_test.
2014-04-23 00:56:17 -07:00