Commit Graph

16 Commits

Author SHA1 Message Date
Dominic Hamon 974cd5a5c5
Ensure we don't need benchmark installed to pass c++ feature checks (#1456)
* Ensure we don't need benchmark installed to pass c++ feature checks

Requires removal of some dependencies on benchmark.h from internal
low-level headers, which is a good thing.

Also added better logging to the feature check cmake module.
2022-08-04 15:33:35 +01:00
Sergiu Deitsch 9e47d070fe
annotate and export public symbols (#1321) 2022-02-14 10:48:53 +00:00
staffantj 0e78738a25
Destructor not returning is expected in some cases (#1316)
* Address MSVC C4722 warning in tests

Some test paths deliberately exit, and it appears that the appropriate declspec
does not stop the compiler generating the C4722 warning as one might expect.

Per https://github.com/google/benchmark/issues/826#issuecomment-851995549
this commit ignores the warning for the affected call site.

* Fix up Formatting

* Fix up formatting issue on pragmas

* Fix up formatting issue on pragmas take 2

Co-authored-by: Staffan Tjernstrom <staffantj@users.noreply.github.com>
2022-01-10 15:44:42 +00:00
Dominic Hamon 6a5bf081d3
prefix macros to avoid clashes (#1186) 2021-06-24 18:21:59 +01:00
BaaMeow 4c2af07889 (clang-)format all the things (#610)
* format all documents according to contributor guidelines and specifications
use clang-format on/off to stop formatting when it makes excessively poor decisions

* format all tests as well, and mark blocks which change too much
2018-06-01 11:14:19 +01:00
Joao Paulo Magalhaes 47226ccd56 CHECK(): rename EPS to FLOAT for consistency with googletest style. 2017-05-01 23:01:10 +01:00
Joao Paulo Magalhaes c16c8fffac CHECK_EPS: Use parentheses to wrap macro arguments. 2017-04-29 20:35:02 +01:00
Joao Paulo Magalhaes 8adf59d762 Add epsilon check macros for float comparison. 2017-04-28 20:40:21 +01:00
Dominic Hamon 332f677b8b Apply clang-format to all headers and source (#303) 2016-10-07 11:35:03 -07:00
Eric cba945e37d Make `PauseTiming()` and `ResumeTiming()` per thread. (#286)
* Change to using per-thread timers

* fix bad assertions

* fix copy paste error on windows

* Fix thread safety annotations

* Make null-log thread safe

* remove remaining globals

* use chrono for walltime since it is thread safe

* consolidate timer functions

* Add missing ctime include

* Rename to be consistent with Google style

* Format patch using clang-format

* cleanup -Wthread-safety configuration

* Don't trust _POSIX_FEATURE macros because OS X lies.

* Fix OS X thread timings

* attempt to fix mingw build

* Attempt to make mingw work again

* Revert old mingw workaround

* improve diagnostics

* Drastically improve OS X measurements

* Use average real time instead of max
2016-09-02 21:34:34 -06:00
Billy O'Neal 3685cad68c Added new noexcept macros for VS2013 (#229) 2016-05-31 14:52:26 -07:00
Eric Fiselier 481e06e65a Address review comments 2016-05-23 15:27:43 -06:00
Eric Fiselier 69d1a52407 Add checks that <Resume|Pause>Timing functions are not called outside of the benchmark. Fixes #204 2016-05-23 15:05:55 -06:00
Anton Danielsson a822c71655 Removed default constructor, copy constructor and assignment operator for CheckHandler. 2015-10-08 10:48:16 +02: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
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