- 07 Mar, 2018 1 commit
-
-
Wink Saville authored
* Rename StringXxx to StrXxx in string_util.h and its users This makes the naming consistent within string_util and moves is the Abseil convention. * Style guide is 2 spaces before end of line "//" comments * Rename StrPrintF/StringPrintF to StrFormat for absl compatibility.
-
- 06 Mar, 2018 2 commits
-
-
Wink Saville authored
On Windows the Shlwapi.h file has a macro: #define StrCat lstrcatA And benchmark/src/string_util.h defines StrCat and it is renamed to lstrcatA if we don't undef the macro in Shlwapi.h. This is an innocuous bug if string_util.h is included after Shlwapi.h, but it is a compile error if string_util.h is included before Shlwapi.h. This fixes issue #545.
-
Wink Saville authored
Upstream spelling fix changes from Pony, ec47ba8f565726414552f4bbf97d7, by ka7@la-evento.com that effected google/benchmark.
-
- 02 Mar, 2018 2 commits
-
-
alekseyshl authored
* Add Solaris support Define BENCHMARK_OS_SOLARIS for Solaris. Platform specific implementations added: * number of CPUs detection * CPU cycles per second detection * Thread CPU usage * Process CPU usage * Remove the special case for per process CPU time for Solaris, it's the same as the default.
-
Robert Guo authored
-
- 21 Feb, 2018 4 commits
-
-
Eric authored
* Print the executable name as part of the context. A common use case of the library is to run two different versions of a benchmark to compare them. In my experience this often means compiling a benchmark twice, renaming one of the executables, and then running the executables back-to-back. In this case the name of the executable is important contextually information. Unfortunately the benchmark does not report this information. This patch adds the executable name to the context reported by the benchmark. * attempt to fix tests on Windows * attempt to fix tests on Windows
-
Jonathan Wakely authored
-
Jonathan Wakely authored
-
Eric Fiselier authored
Due to ADL lookup performed on the begin and end functions of `for (auto _ : State)`, std::iterator_traits may get incidentally instantiated. This patch ensures the library can tolerate that.
-
- 14 Feb, 2018 2 commits
-
-
Ian McKellar authored
* Don't include <sys/resource.h> on Fuchsia. It doesn't support POSIX resource measurement and timing APIs. Change-Id: Ifab4bac4296575f042c699db1ce5a4f7c2d82893 * Add BENCHMARK_OS_FUCHSIA for Fuchsia Change-Id: Ic536f9625e413270285fbfd08471dcb6753ddad1
-
Eric authored
* Improve State packing: put important members on first cache line. This patch does a few different things to ensure commonly accessed data is on the first cache line of the `State` object. First, it moves the `error_occurred_` member to reside after the `started_` and `finished_` bools, since there was internal padding there that was unused. Second, it moves `batch_leftover_` and `max_iterations` further up in the struct declaration. These variables are used in the calculation of `iterations()` which users might call within the loop. Therefore it's more important they exist on the first cache line. Finally, this patch turns the bool members into bitfields. Although this shouldn't have much of an effect currently, because padding is still needed between the last bool and the first size_t, it should help in future changes that require more "bool like" members. * Remove bitfield change for now * Move bools (and their padding) to end of "first cache line" vars. I think it makes the most sense to move the padding required following the group of bools to the end of the variables we want on the first cache line. This also means that the `total_iterations_` variable, which is the most accessed, has the same address as the State object. * Fix static assertion after moving bools
-
- 13 Feb, 2018 5 commits
-
-
Samuel Panzer authored
* Support State::KeepRunningBatch(). State::KeepRunning() can take large amounts of time relative to quick operations (on the order of 1ns, depending on hardware). For such sensitive operations, it is recommended to run batches of repeated operations. This commit simplifies handling of total_iterations_. Rather than predecrementing such that total_iterations_ == 1 signals that KeepRunning() should exit, total_iterations_ == 0 now signals the intention for the benchmark to exit. * Create better fast path in State::KeepRunningBatch() * Replace int parameter with size_t to fix signed mismatch warnings * Ensure benchmark State has been started even on error. * Simplify KeepRunningBatch() * Implement KeepRunning() in terms of KeepRunningBatch(). * Improve codegen by helping the compiler undestand dead code. * Dummy commit for build bots' benefit.
-
Eric authored
* Attempt to fix travis timeouts during apt-get. During some builds, travis fails to update the apt-get indexes. This causes the build to fail in different ways. This patch attempts to avoid this issue by manually calling apt-get update. I'm not sure if it'll work, but it's worth a try. * Fix missing semicolons in command
-
Eric Fiselier authored
The appveyor bot sometimes fails because the time it outputs is 6 digits long, but the output test regex expects at most 5 digits. This patch increases the size to 6 digits to placate the test. This should not *really* affect the correctness of the test.
-
Eric Fiselier authored
-
Eric authored
We're propagating extra warning flags to the gtest build, which can cause it to fail. This patch prevents passing "-Wextra" to gtest, since the library itself doesn't test with that flag.
-
- 10 Feb, 2018 1 commit
-
-
Samuel Panzer authored
* Support State::KeepRunningBatch(). State::KeepRunning() can take large amounts of time relative to quick operations (on the order of 1ns, depending on hardware). For such sensitive operations, it is recommended to run batches of repeated operations. This commit simplifies handling of total_iterations_. Rather than predecrementing such that total_iterations_ == 1 signals that KeepRunning() should exit, total_iterations_ == 0 now signals the intention for the benchmark to exit. * Create better fast path in State::KeepRunningBatch() * Replace int parameter with size_t to fix signed mismatch warnings * Ensure benchmark State has been started even on error. * Simplify KeepRunningBatch()
-
- 04 Feb, 2018 1 commit
-
-
Tim authored
-
- 29 Jan, 2018 1 commit
-
-
Dominic Hamon authored
-
- 19 Jan, 2018 1 commit
-
-
oskidan authored
conversion in sysinfo.cc
-
- 12 Jan, 2018 1 commit
-
-
Dominic Hamon authored
Some command line or build systems may already set these (eg, bazel) so make sure that takes priority. Fixes #513
-
- 05 Jan, 2018 3 commits
-
-
Eric authored
Prevent GTest and GMock from being installed with Google Benchmark.
-
Eric Fiselier authored
When users satisfy the GTest dependancy by placing a googletest directory in the project, the targets from GTest and GMock incorrectly get installed along side this library. We shouldn't be installing our test dependancies. This patch forces the options that control installation for googletest to OFF.
-
Winston Du authored
For people who get this library via CMake's AddExternalProject like me. Would like a long term tutorial from someone who really understands CMake on how to actually link an externalproject's dependencies to another added external project.
-
- 14 Dec, 2017 1 commit
-
-
Dominic Hamon authored
-
- 13 Dec, 2017 2 commits
-
-
Eric authored
* Add support for GTest based unit tests. As Dominic and I have previously discussed, there is some need/desire to improve the testing situation in Google Benchmark. One step to fixing this problem is to make it easier to write unit tests by adding support for GTest, which is what this patch does. By default it looks for an installed version of GTest. However the user can specify -DBENCHMARK_BUILD_EXTERNAL_GTEST=ON to instead download, build, and use copy of gtest from source. This is quite useful when Benchmark is being built in non-standard configurations, such as against libc++ or in 32 bit mode.
-
Eric Fiselier authored
This patch documents the newly added v2 branch, which will be used to stage, test, and receive feedback on upcoming features, most of which will be breaking changes which can't be directly applied to master.
-
- 07 Dec, 2017 1 commit
-
-
Dominic Hamon authored
-
- 04 Dec, 2017 1 commit
-
-
Louis Dionne authored
-
- 30 Nov, 2017 2 commits
-
-
Victor Costan authored
-
Victor Costan authored
-
- 29 Nov, 2017 2 commits
-
-
Roman Lebedev authored
* CMake: implement LTO for clang. Fixes #478 * LTO: add basic docs about required executables.
-
Kishan Kumar authored
* Initial CLA Requirement * Added Installation steps to the Readme.md * Fixed error in running benchmark of Installation * Remove unwanted commands Removed the lengthy install procedure with suggested install mechanism
-
- 27 Nov, 2017 1 commit
-
-
Roman Lebedev authored
Old output example: ``` Benchmark Time CPU Iterations CPUTime,s Pixels/s ThreadingFactor ------------------------------------------------------------------------------------------------------------------------------ 20170525_0036TEST.RAF/threads:8/real_time 45 ms 45 ms 16 0.718738 79.6277M/s 0.999978 2.41419GB/s 22.2613 items/s FileSize,MB=111.050781; MPix=57.231360 ``` New output example: ``` Benchmark Time CPU Iterations CPUTime,s Pixels/s ThreadingFactor ------------------------------------------------------------------------------------------------------------------------------ 20170525_0036TEST.RAF/threads:8/real_time 45 ms 45 ms 16 0.713575 80.1713M/s 0.999571 2.43067GB/s 22.4133 items/s FileSize,MB=111.050781; MPix=57.231360 ```
-
- 26 Nov, 2017 2 commits
-
-
Eric Fiselier authored
This patch primarily changes the BENCHMARK_UNREACHABLE() implementation under MSVC to use __assume(false) instead of being a NORETURN function, which ironically caused unreachable code warnings. Second, since the NOTHROW function attempt generated the warnings we meant to avoid, it has been replaced with a dummy null statement.
-
Eric authored
* Improve CPU Cache info reporting -- Add Windows support. This patch does a couple of thing regarding CPU Cache reporting. First, it adds an implementation on Windows. Second it fixes the JSONReporter to correctly (and actually) output the CPU configuration information. And finally, third, it detects and reports the number of physical CPU's that share the same cache.
-
- 22 Nov, 2017 1 commit
-
-
Eric authored
* Refactor System information collection. This patch refactors the system information collection, and in particular information about the target CPU. The motivation is to make it easier to access CPU information, and easier to add new information as need be. This patch additionally adds information about the cache sizes of the CPU. * Address review comments: Clean up integer types. This commit cleans up the integer types used in ValueUnion to follow the Google style guide. Additionally it adds a BENCHMARK_UNREACHABLE macro to assist in documenting/catching unreachable code paths. * Rename ValueUnion accessors.
-
- 17 Nov, 2017 1 commit
-
-
Kamil Rytarowski authored
Define BENCHMARK_OS_NETBSD for NetBSD. Add detection of cpuinfo_cycles_per_second and cpuinfo_num_cpus. This code shared detection of these properties with FreeBSD.
-
- 15 Nov, 2017 1 commit
-
-
Steinar H. Gunderson authored
-
- 13 Nov, 2017 1 commit
-
-
Dominic Hamon authored
Fixes #479
-