* update version of gtest to v1.15.2 (latest) and also the cmake configuration to avoid deprecation warnings
* `cmake/GoogleTest.cmake.in`: do a shallow clone of google test
---------
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
Co-authored-by: Roman Lebedev <lebedev.ri@gmail.com>
* fix memory manager result bug
* change is_valid to memory_iterations
* fix test
* some fixes
* fix test
...for msvc
* fix test
* fix test
add the correct explicitly casts
* fix msvc failure
* some fixes
* remove unnecessary include
There is no upstream PFM cmake package config file to use, so this has
to be installed for the benchmark cmake package config file to work.
Bug: https://bugs.gentoo.org/950573
See-Also: c2146397ac
Signed-off-by: Alfred Wingate <parona@protonmail.com>
The changes are an autofix added in Buildifier 8.0.1, designed to future-proof
Bazel projects against the eventual removal of these rules from the native
Bazel namespace.
* [clang-tidy] fix warning about decaying array to pointer
* fix a different warning (old style cast)
* use string_view instead of old-style const char* strings
* ensure bazel windows is using c++17
* learn to use bazel
* and tests
* precommit fix
* more string_view creation and casting
* format
* format
* [clang-tidy] use unique_ptr for benchmark registration (#1927)
* use unique_ptr for benchmark registration
* benchmark declarations can and should be const (clang-tidy)
* clang-format
* add clang-tidy ignore file to remove googletest (and other third party) source for consideration
* remove cxx03 test, fully unblocking c++1X development
* remove unnecessary macros
* pre-commit
* remove opt-in analyzer warnings from clang-tidy
* revert some changes, flush streams
* replace abort with exit(1) to call atexit and dtors
* remove more endl and put in explicit flush
AIX, WASM (fork of musl for libc) and a few others should now use the sysconf
path. /proc is not portable and cpuinfo is Linux specific. It does not work
anywhere else.
Try to use the sysconf method on other OS's other than just
Linux and Solaris if it exists. Also slight shuffling of the
order of sysctl and sysconf methods.
* Retrieve the number of online CPUs on OpenBSD and NetBSD
* Spacing adjustment
---------
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
* change pacboy compiler target for windows builds
* use an action for cmake instead of doing things manually
* set compiler for cmake
* remove cmake action from msys2 build
* readd cmake package for msys2
* fix cmake test path to match build
* fix msvc build type setting
* fix msvc build type setting
* consistent output directory for msvc
* remove legacy environments (https://www.msys2.org/docs/environments/\#__tabbed_1_2)
* remove shell overrides and depend on default for msys2
Run the external profiler the same number of iterations as the
benchmark was run normally.
This makes, for example, a trace collected via ProfilerManager
consistent with collected PMU data.
As a fix, also turn the comment in libpfm's build file into a proper Starlark
docstring.
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
* Get number of CPUs with sysconf() on Linux
Avoid parsing the /proc/cpuinfo just to get number of CPUs.
Instead use the portable function provided by glibc.
* Update sysinfo.cc
The testcase fails on sparc64, because the parsing of /proc/cpuinfo
fails and thus currently returns "0" CPUs which finally leads
to division-by-zero faults in the tests.
Fix the issue by returning at least "1" CPU which allows the
tests to run. A error message will be printed in any case.
Long-term the code should be fixed to parse the cpuinfo output
on sparch which looks like this:
...
type : sun4v
ncpus probed : 48
ncpus active : 48
The Linux kernel provides the clock_gettime() functions since a long
time already, so it's possible to use it as a generic fallback option
for any architecture if no other (better) possibility has been provided
instead.
I noticed the benchmark package failed to build on debian on the SH-4
architecture, so with this change SH-4 is now the first user of this
fallback option.
- MP flag only applies to cl, not cl frontends to other compilers (e.g. clang-cl, icx-cl etc).
Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
In a future version of bazel this produces a warning. In this case using
only the platform being windows is enough. Fixes:
```
WARNING: /.../benchmark/BUILD.bazel:29:15: in config_setting rule //:windows: select() on cpu is deprecated. Use platform constraints instead: https://bazel.build/docs/configurable-attributes#platforms.
```