* Auto-detect whether to produce colorized output
Rename --color_print to --benchmark_color for consistency with the other
flags (and Google Test). Old flag name is kept around for compatibility.
The --benchmark_color/--color_print flag takes a third option, "auto",
which is the new default. In this mode, we attempt to auto-detect
whether to produce colorized output. (The logic for deciding whether to
use colorized output was lifted from GTest:
<https://github.com/google/googletest/blob/master/googletest/src/gtest.cc#L2925>.)
* Update CONTRIBUTORS, AUTHORS
If a reporter's output stream isn't line-buffered (e.g. it's not writing
to a terminal) then it can be some time before a write to it becomes
visible.
This is problematic if, say, you're wanting to use tail -f to view the
file written to via --benchmark_out. Or if the application crashes,
leaving you with no results.
Addressed by flushing the reporters' output streams whenever we invoke
methods that may write to them.
* Refactor benchmark.cc into benchmark_register.cc and benchmark_run.cc
The benchmark.cc file is getting really big and it contains a bunch of
unrelated components. This patch separates the files into two separate
parts. The "runtime" parts and the "registration" parts.
This patch also removes the PIMPL used by Benchmark. Previously we couldn't
have STL types in the interface but now we can. Therefore there is no reason
to keep BenchmarkImp.
* add missing include
* rework windows timers again
* Guard timespec on older Windows versions
* Remove old thread safety annotation workarounds
* 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
* Fixture: add non const Setup() and TearDown().
This allows write-access to the State variable, which is important in
upcoming user-defined counter functionality.
* Fix const placement in the Fixture methods.
* Fixture: use const_cast instead of static_cast.
In the `Ranges(...)` generation code a "control" vector which stores
the current index for each range passed to `Ranges`. Previously this vector
was incorrectly initialized to the size of the subranges not the number
of subranges.
Additionally this patch suppresses unused warnings generated by
`stream_init_anchor`.
The benchmark library internals write to std::cout/std::cerr during program
startup. This can cause segfaults when the user doesn't include <iostream> in
the benchmark (which init's the streams). This patch fixes this by emitting
a dynamic initializer in every TU which initializes the streams.
* refactor
* Move default substitutions into library
* Move default substitutions to the *right* place in the library
* Fix init order issues that caused test failures
* improve diagnostics
* add missing include
* general cleanup
* Address review comments
The plain MinGW enviroment does not provide any threading supporting, including
in the C++ STL. The MinGW-w64 enviroment does not have this problem.
This patch removes the 32 bit bot since it's always going to fail.
This patch adds the compare_bench.py utility which can be used to compare the result of benchmarks.
The program is invoked like:
$ compare_bench.py <old-benchmark> <new-benchmark> [benchmark options]...
Where <old-benchmark> and <new-benchmark> either specify a benchmark executable file, or a JSON output file. The type of the input file is automatically detected. If a benchmark executable is specified then the benchmark is run to obtain the results. Otherwise the results are simply loaded from the output file.
Currently out Appveyor CI downloads and stashes a custom MinGW installation.
However the builder already provides both 64 and 32 bit installations of MinGW.
This patch changes our CI to use those instead.
I'm hoping this will fix issues where the g++ is broken due to the Appveyor
package caching semantics.
Currently the Appveyor bot is a PIT. It never passes and it often hangs
or gives very poor output. This patch rewrites the configuration.
This patch also attempts to fix a flaky complexity test as a drive-by.
This patch adds new builders that test against GCC 6 and Clang 3.8 respectivly.
They also enable both address and undefined sanitizer. MSAN currently won't work
since it requires a sanitized STL.
Previously the FittingCurve functions for n^2 and n^3 did the calculation
using int types. This can overflow and cause UB. This patch changes the
calculations to use std::pow to prevent this.
Also re-enable VC 2013 appveyor bot since I *hope* this is what was causing
the failures.
VC 2013 injects valid when assigning an initializer list to std::set.
This attempts to work around this issue by using std::set's constructors
instead of the assignment operators.