History log of /external/google-benchmark/test/benchmark_test.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5b2c08668c2bab4120b02830d38416c3402b7894 04-Dec-2017 Louis Dionne <ldionne.2@gmail.com> Enforce using a semicolon after BENCHMARK_MAIN to remove compiler warnings (#495)
/external/google-benchmark/test/benchmark_test.cc
fa341e51cb7f6bce69a7577f4000381a03f61c70 31-Oct-2017 Leo Koppel <lkoppel@uwaterloo.ca> Improve BM_SetInsert example (#465)

* Fix BM_SetInsert example

Move declaration of `std::set<int> data` outside the timing loop, so that the
destructor is not timed.

* Speed up BM_SetInsert test

Since the time taken to ConstructRandomSet() is so large compared to the time
to insert one element, but only the latter is used to determine number of
iterations, this benchmark now takes an extremely long time to run in
benchmark_test.

Speed it up two ways:
- Increase the Ranges() parameters
- Cache ConstructRandomSet() result (it's not random anyway), and do only
O(N) copy every iteration

* Fix same issue in BM_MapLookup test

* Make BM_SetInsert test consistent with README

- Use the same Ranges everywhere, but increase the 2nd range
- Change order of Args() calls in README to more closely match the result of Ranges
- Don't cache ConstructRandomSet, since it doesn't make sense in README
- Get a smaller optimization inside it, by givint a hint to insert()
/external/google-benchmark/test/benchmark_test.cc
25acf220a44ccc41104a690731fcf646cc3e8192 17-Oct-2017 Eric <eric@efcs.ca> Refactor most usages of KeepRunning to use the perfered ranged-for. (#459)

Recently the library added a new ranged-for variant of the KeepRunning
loop that is much faster. For this reason it should be preferred in all
new code.

Because a library, its documentation, and its tests should all embody
the best practices of using the library, this patch changes all but a
few usages of KeepRunning() into for (auto _ : state).

The remaining usages in the tests and documentation persist only
to document and test behavior that is different between the two formulations.

Also note that because the range-for loop requires C++11, the KeepRunning
variant has not been deprecated at this time.
/external/google-benchmark/test/benchmark_test.cc
6d8339dd97afea4633e54ed4b42307aff4386040 14-Sep-2017 Eric <eric@efcs.ca> Fix #444 - Use BENCHMARK_HAS_CXX11 over __cplusplus. (#446)

* Fix #444 - Use BENCHMARK_HAS_CXX11 over __cplusplus.

MSVC incorrectly defines __cplusplus to report C++03, despite the compiler
actually providing C++11 or greater. Therefore we have to detect C++11 differently
for MSVC. This patch uses `_MSVC_LANG` which has been defined since
Visual Studio 2015 Update 3; which should be sufficient for detecting C++11.

Secondly this patch changes over most usages of __cplusplus >= 201103L to
check BENCHMARK_HAS_CXX11 instead.

* remove redunant comment
/external/google-benchmark/test/benchmark_test.cc
693a43013d5e7344e5f627bc773aff7fe0151391 27-Apr-2017 Joao Paulo Magalhaes <dev@jpmag.me> User counters: add more unit tests. ...

The tests are still missing a way to check actual validity of
numerical results; this will be done next. As they currently are,
the tests pass, but the problem detected with #378 is still
standing and the results with non-standard counters are wrong.
/external/google-benchmark/test/benchmark_test.cc
9b92ed76a8620354403b5f1d089560048b6843bb 28-Mar-2017 rolandschulz <roland@rschulz.eu> Fix ICC compiler warnings (#358)

fixes #354

The build fails with ICC17 because of warnings and Werror. What is the correct solution to fix it?
Should a patch

disable Werror for ICC (or maybe all non known compilers)
disable the false postive warnings for all files. This could be done using:
add_cxx_compiler_flag(-wd2102) #ICC17u2: Many false positives for Wstrict-aliasing
add_cxx_compiler_flag(-wd2259) #ICC17u2: non-pointer conversion from "long" to "int" may lose significant bits (even for explicit static cast, sleep.cc(44))
add_cxx_compiler_flag(-wd654) #ICC17u2: overloaded virtual function "benchmark::Fixture::SetUp" is only partially overridden (because of deprecated overload)
disable warnings at file level or some other granularity
/external/google-benchmark/test/benchmark_test.cc
a9a66c85bbfda1d744c267c5e5aa073ef3d1c1d5 02-Mar-2017 jpmag <dev@jpmag.me> Add user-defined counters. (#262)

* Added user counters, and move use of bytes_processed and items_processed to user counter logic.

Each counter is a string-value pair. The counters were
made available through the State class. Two helper virtual
methods were added to the Fixture class to allow convenient
initialization and termination of the counters: InitState()
and TerminateState(). The reporting of the counters is buggy
and is still a work in progress, to be completed in the next commits.

* fix bad removal of BenchmarkCounters code during the merge

* add myself to AUTHORS/CONTRIBUTORS

* fix printing to std::cout in csv_reporter

* bytes_per_second and items_per_second are now in the UserCounters class

* add user counters to json reporter

* moving bytes_per_second and items_per_second to their old state

* console reporter dealing ok with user counters.

* update unit tests for user counters

* CSVReporter now prints user counters too.

* cleanup user counters

* reverted changes to cmake files which should have gone into later commits

* fixture_test: fix gcc 4.6 compilation

* remove ctor with default argument

see https://github.com/google/benchmark/pull/262#discussion_r72298055

* use (auto-defined) BENCHMARK_HAS_CXX11 instead of BENCHMARK_INITLIST.

https://github.com/google/benchmark/pull/262#discussion_r72298310

* leanify counters API

Discussions:
API complexity: https://github.com/google/benchmark/pull/262#discussion_r72298731
remove std::string dependency (WIP): https://github.com/google/benchmark/pull/262#discussion_r72298142
spacing & alignment: https://github.com/google/benchmark/pull/262#discussion_r72298422

* remove std::string dependency on public API - changed counter name storage to char*

* Counter ctor: use overloads instead of default arguments

discussion:
https://github.com/google/benchmark/pull/262#discussion_r72298055

* Use raw pointers to remove dependency on std::vector from public API .

For more info, see discussion at https://github.com/google/benchmark/pull/262#discussion_r72319678 .

* Move counter implementation from benchmark.cc to counter.cc.

See discussion: https://github.com/google/benchmark/pull/262#discussion_r72298980 .

* Remove unused (commented-out) code.

* Moved thread counters to ThreadStats.

* Counters: fixed copy and move constructors.

* Counter: use an inplace buffer for small names.

* benchmark_test: move counters test out of CXX11 preprocessor conditional.

* Counter: fix VS2013 compilation error in char[] initialization.

* Fix typo.

* Expose counters from State.

See discussion: https://github.com/google/benchmark/pull/262#issuecomment-237156951

* Changed counters interface to map-like.

* Fix printing of user counters in ConsoleReporter.

* Applied clang-format to counter.cc and console_reporter.cc.

Command was `clang-format -style=Google -i counter.cc console_reporter.cc`
I also applied to all other files, but the changes were very
far-reaching so I rolled those back.

* Rename Counter::Flags_e to Counter::Flags

* Fix use of reserved names in Counter and BenchmarkCounters.

* Counter: Fix move ctor bug + change order of members.

* Fixture: remove tentative methods InitState() and TerminateState().

* Update fixture_test to the new Fixture interface.

* BenchmarkCounters: fixed a bug in the move ctor. Remove call to CHECK_LT().

CHECK_LT() was making the size_t lookup take ~double the time of a string lookup!

* BenchmarkCounters: add option to not print zero counters (defaults to false).

* Add test to compare counter storage and access with std::map.

* README: clarify cost of counter access modes.

* move counter access test to an own test.

* BenchmarkCounters: add move Insert()

* Counters access test: add accelerated lookup by name.

* Fix old range syntax.

* Fix missing include of cstdio

* Fix Visual Studio warning

* VS2013 and lower: fix use of snprintf()

* VS2013: fix use of char[] as a member of std::pair<>.

* change counter storage to std::map

* Remove skipZeroCounters logic

* Fix VS compilation error.

* Implemented request changes to PR #262.

* PR #262: More requested changes.

* README: cleanup counter text.

* PR #262: remove clang-format changes for preexisting code

* Complexity+Counters: fix counter flags which were being ignored.

* Document all Counter::Flag members

* fixed loss of counter values

* ConsoleReporter: remove tabular printing of user counters.

* ConsoleReporter: header printing should not be contingent on user counter names.

* Minor white space and alignment fixes.

* cxx03_test + counters: reuse the BM_empty() function.

* user counters: add note to README on how counters are gathered across threads
/external/google-benchmark/test/benchmark_test.cc
1100e9190709a48b0819c84b3cebeaf2bf904d65 07-Oct-2016 Dominic Hamon <dominichamon@users.noreply.github.com> Simplify clang-format and apply to tests (#302)
/external/google-benchmark/test/benchmark_test.cc
72be9523bb88d5b96e3891776fad18b790bfd2d2 03-Sep-2016 Ronny <ronnybrendel@gmail.com> Add Benchmark::ThreadRange() version with increment instead of multiply (#283)

* add additive thread range

* add test
/external/google-benchmark/test/benchmark_test.cc
dfe026075480f117f424d254c2f701ac97ea4cdd 04-Aug-2016 Marcin Kolny <marcin.kolny@gmail.com> Support multiple ranges in the benchmark (#257)

* Support multiple ranges in the benchmark

google-benchmark library allows to provide up to two ranges to the
benchmark method (range_x and range_y). However, in many cases it's not
sufficient. The patch introduces multi-range features, so user can easily
define multiple ranges by passing a vector of integers, and access values
through the method range(i).

* Remove redundant API

Functions State::range_x() and State::range_y() have been removed. They should
be replaced by State::range(0) and State::range(1).
Functions Benchmark::ArgPair() and Benchmark::RangePair() have been removed.
They should be replaced by Benchmark::Args() and Benchmark::Ranges().
/external/google-benchmark/test/benchmark_test.cc
1bd62bd0becbb692c7088f331c876ca3aeff4c65 22-Jul-2016 Eric Fiselier <eric@efcs.ca> Revert "Workaround missing std::this_thread::sleep_for function in tests."

GCC 4.6 doesn't provide std::chrono::steady_clock and GCC 4.7 doesn't provide
std::this_thread::sleep_for. I would prefer to support GCC 4.7 but I'm
reverting this since the bots are GCC 4.6.

This reverts commit c5f454957d457e8b6ae5a1a1eaf8eb6739c17f67.
/external/google-benchmark/test/benchmark_test.cc
c5f454957d457e8b6ae5a1a1eaf8eb6739c17f67 22-Jul-2016 Eric Fiselier <eric@efcs.ca> Workaround missing std::this_thread::sleep_for function in tests.

GCC 4.7 doesn't provide std::this_thread::sleep_for on my system.
This patch changes the tests to use a different method for wasting
cycles.
/external/google-benchmark/test/benchmark_test.cc
238e558fdb6f00a2e3eb75d6c353030f8a510f8c 27-May-2016 Eric <eric@efcs.ca> Allow benchmarks to take arbitrary arguments. (#221)

* Add lambda benchmarks

* Remove lambda capture since the lambda is not at a block scope

* Remove LambdaBenchmark helper since FunctionBenchmark can be used with non-capturing lambas

* Add lambda benchmarks

* Remove lambda capture since the lambda is not at a block scope

* Remove LambdaBenchmark helper since FunctionBenchmark can be used with non-capturing lambas

* Add more docs for BENCHMARK_CAPTURE.

* Fix use of misnamed parameter

* Guard BENCHMARK_CAPTURE tests against non-c++11 compilers

* Move tests out of basic_test.cc
/external/google-benchmark/test/benchmark_test.cc
df9ab80113a890c38ff93ef37699078eeceb29fc 11-May-2016 Billy Robert O'Neal III <bion@microsoft.com> Use nanoseconds instead of duration<double, milli>

MSVC++ before 2015 Update 2 has a bug in sleep_for where it tries to
implicitly += the input with a nanoseconds variable. Work around this by
using nanoseconds directly (which can be implicitly +='d with
chrono::nanoseconds).
/external/google-benchmark/test/benchmark_test.cc
e253a284029c34f764fc26bb7859298d4ec0551b 30-Apr-2016 Jussi Knuuttila <jussi.knuuttila@gmail.com> Manual timing support.
/external/google-benchmark/test/benchmark_test.cc
007efee75186d1aa54be7e83e80986e753a2ee44 15-Feb-2016 Jakob Buchgraber <jakob.buchgraber@tum.de> Add number of threads to State.

Having access to the thread count from within a benchmark is useful,
for when one wants to distribute a workload dynamically among the
benchmarks running in parallel e.g when using ThreadRange() or
ThreadPerCpu().
/external/google-benchmark/test/benchmark_test.cc
c8f4690fd42c0a90d5afc3fd0a23124427f16322 08-Oct-2015 Anton Danielsson <anton.danielsson@dirac.se> Sorted include of headers.
/external/google-benchmark/test/benchmark_test.cc
df0df4aba9d5997cdcddcec351ed5b5af180bb88 05-Oct-2015 Anton Danielsson <anton.danielsson@dirac.se> Fixed tests so they build on android.

- Added missing header to test/benchmark_test.cc
- Changed std::stoul to std::atol in test/filter_test.cc because of a
limitation in the android-ndk (http://stackoverflow.com/questions/17950814/how-to-use-stdstoul-and-stdstoull-in-android)
/external/google-benchmark/test/benchmark_test.cc
ed0a2eb7411da5650551088905d13ed941b21e69 01-Oct-2015 Eric Fiselier <eric@efcs.ca> use size_t instead of int for the iteration count
/external/google-benchmark/test/benchmark_test.cc
9ed1082c33829a73e1ba5b143232ea14c5f06f3c 27-Mar-2015 Eric Fiselier <eric@efcs.ca> Merge branch 'master' into new-benchmark-interface
e428b9eec3291f564073cd4bc98e8c312cbfcafd 27-Mar-2015 Eric Fiselier <eric@efcs.ca> Add 'benchmark::DoNotOptimize(...)' to help users prevent optimizations
/external/google-benchmark/test/benchmark_test.cc
c5f238b18ca52668978f6c0a39b9099b4ea4f14b 27-Mar-2015 Eric Fiselier <eric@efcs.ca> Fix column width calculation and remove duplicate test
/external/google-benchmark/test/benchmark_test.cc
4bf6ceb50dcebe08afb10670a9e0c9c077a6305a 27-Mar-2015 Eric Fiselier <eric@efcs.ca> Change the available benchmark options
/external/google-benchmark/test/benchmark_test.cc
daa8a67aa575ef2a52d4a90985ae40faad5c0ff1 18-Mar-2015 Eric Fiselier <eric@efcs.ca> add C++03 test and update README
/external/google-benchmark/test/benchmark_test.cc
279e502a05482b9621f5d52dd7fc80a20014dc85 17-Mar-2015 Eric Fiselier <eric@efcs.ca> add test for benchmark with two template parameters
/external/google-benchmark/test/benchmark_test.cc
66bf7c8f7194ecd3b9f6426ca3b4807e8a8996a2 13-Mar-2015 Eric Fiselier <eric@efcs.ca> add floating point comparison warnings
/external/google-benchmark/test/benchmark_test.cc
7a767012f1c423b37069f6d315b97164b5850271 12-Mar-2015 Eric Fiselier <eric@efcs.ca> 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().
/external/google-benchmark/test/benchmark_test.cc
d68127d8adc1111c49b372ba12f7c3e4f053a2f0 11-Mar-2015 Dominic Hamon <dma+github@stripysock.com> 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'.
/external/google-benchmark/test/benchmark_test.cc
3b40f0a7a320b5551259be8ffe556996efb006d6 10-Mar-2015 Dominic Hamon <dma+github@stripysock.com> Add filter test, remove re test, and googletest deps
/external/google-benchmark/test/benchmark_test.cc
f947cebe15c6c56383d630e1f4e9f5fc6bd6332a 06-Mar-2015 Eric Fiselier <eric@efcs.ca> remove ifdefs around BM_Factorial
/external/google-benchmark/test/benchmark_test.cc
8f96f50553d5b775148ee207b73e72b8e260799c 06-Mar-2015 Eric Fiselier <eric@efcs.ca> comment out test to prevent failures.
/external/google-benchmark/test/benchmark_test.cc
8ed7d7664bbd64490f591339648261b642d6372e 06-Mar-2015 Eric Fiselier <eric@efcs.ca> 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.
/external/google-benchmark/test/benchmark_test.cc
5b41e128b359900264464c480dfd4f107625f3c9 06-Mar-2015 Eric Fiselier <eric@efcs.ca> 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.
/external/google-benchmark/test/benchmark_test.cc
3968ff45baf9ddc526ed68a3f6ee846dc0e1f332 18-Feb-2015 Dominic Hamon <dma+github@stripysock.com> Fix #72 by avoiding 64-to-32-bit shortenings
/external/google-benchmark/test/benchmark_test.cc
b40b66ab3bfcafac4a289159a9135ea8ea2a6ef0 02-Dec-2014 Dominic Hamon <dma+github@stripysock.com> Actually fix issue with CHECK
/external/google-benchmark/test/benchmark_test.cc
d31977bb699389533d65f41ad69a0d8a5e7da137 02-Dec-2014 Dominic Hamon <dma+github@stripysock.com> Added gtest CHECK symbol to benchmark test
/external/google-benchmark/test/benchmark_test.cc
0f78cebba5640559694693386bc850df8a6d1d31 14-Nov-2014 Lei Xu <eddyxu@gmail.com> Use #ifdef to protect calling Factorial in benchmark_test.cc
/external/google-benchmark/test/benchmark_test.cc
7e290fb96530bd14c4fb6f9f40eb692af5e2e21c 13-Nov-2014 Dominic Hamon <dma+github@stripysock.com> Fix release builds
/external/google-benchmark/test/benchmark_test.cc
a3b5e44c529996a3663ddf48a40e33cd0fe3fdf2 01-Nov-2014 Dominic Hamon <dma+github@stripysock.com> 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.
/external/google-benchmark/test/benchmark_test.cc
11769369660577d67b70725c13a16b05f4d584b6 08-Aug-2014 Matt Clarkson <mattyclarkson@gmail.com> 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.
/external/google-benchmark/test/benchmark_test.cc
373cc411004a4dfb5a5486dc869b835d029ad440 04-Aug-2014 Matt Clarkson <mattyclarkson@gmail.com> C++11 concurrency instead of pthread
/external/google-benchmark/test/benchmark_test.cc
664159372cea8ce58f548172025d680c653fa68e 17-Apr-2014 Shuo Chen <chenshuo@chenshuo.com> Use a new container in each round of push_back test.

Otherwise containers keep growing and uses gigabytes of memory.
/external/google-benchmark/test/benchmark_test.cc
3a01f8320ba44dcfaff5fbff923cde2cf7d4e7f7 07-Jan-2014 Dominic Hamon <dominic+github@google.com> Add items/bytes processed to SetInsert benchmark test
/external/google-benchmark/test/benchmark_test.cc
2923a481edb5399926c957b0d2433433c21ee071 07-Jan-2014 Dominic Hamon <dominic+github@google.com> Multithreaded tests are reenabled
/external/google-benchmark/test/benchmark_test.cc
15bf66750cb068eb6ca51baaef14e339f7a11e87 21-Dec-2013 Dominic Hamon <dominic+github@google.com> Really drop multithreading support
/external/google-benchmark/test/benchmark_test.cc
403f35442375f2ee858981b79421ca321645df08 19-Dec-2013 Dominic Hamon <dominic+github@google.com> 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).
/external/google-benchmark/test/benchmark_test.cc