mirror of
https://github.com/google/benchmark.git
synced 2025-04-29 22:40:33 +08:00
Merge branch 'google:main' into master
This commit is contained in:
commit
c559b1fba9
2
.github/workflows/bazel.yml
vendored
2
.github/workflows/bazel.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
bzlmod: [false, true]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: mount bazel cache
|
||||
uses: actions/cache@v3
|
||||
|
3
.github/workflows/clang-format-lint.yml
vendored
3
.github/workflows/clang-format-lint.yml
vendored
@ -4,7 +4,8 @@ on:
|
||||
pull_request: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
job:
|
||||
name: check-clang-format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
@ -64,7 +64,7 @@ MemoryManager* memory_manager = nullptr;
|
||||
|
||||
namespace {
|
||||
|
||||
static constexpr IterationCount kMaxIterations = 1000000000;
|
||||
static constexpr IterationCount kMaxIterations = 1000000000000;
|
||||
const double kDefaultMinTime =
|
||||
std::strtod(::benchmark::kDefaultMinTimeStr, /*p_end*/ nullptr);
|
||||
|
||||
@ -325,8 +325,8 @@ IterationCount BenchmarkRunner::PredictNumItersNeeded(
|
||||
|
||||
// So what seems to be the sufficiently-large iteration count? Round up.
|
||||
const IterationCount max_next_iters = static_cast<IterationCount>(
|
||||
std::lround(std::max(multiplier * static_cast<double>(i.iters),
|
||||
static_cast<double>(i.iters) + 1.0)));
|
||||
std::llround(std::max(multiplier * static_cast<double>(i.iters),
|
||||
static_cast<double>(i.iters) + 1.0)));
|
||||
// But we do have *some* limits though..
|
||||
const IterationCount next_iters = std::min(max_next_iters, kMaxIterations);
|
||||
|
||||
|
@ -15,6 +15,10 @@
|
||||
#include "internal_macros.h"
|
||||
|
||||
#ifdef BENCHMARK_OS_WINDOWS
|
||||
#if !defined(WINVER) || WINVER < 0x0600
|
||||
#undef WINVER
|
||||
#define WINVER 0x0600
|
||||
#endif // WINVER handling
|
||||
#include <shlwapi.h>
|
||||
#undef StrCat // Don't let StrCat in string_util.h be renamed to lstrcatA
|
||||
#include <versionhelpers.h>
|
||||
|
Loading…
Reference in New Issue
Block a user