Skip to content

Commit b6d18f8

Browse files
committed
fix: remove ns benches
1 parent 364e3ec commit b6d18f8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/google_benchmark_cmake/sleep_bench.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
#include <chrono>
66
#include <thread>
77

8-
static void BM_sleep_1ns(benchmark::State& state) {
8+
static void BM_sleep_1us(benchmark::State& state) {
99
for (auto _ : state) {
10-
std::this_thread::sleep_for(std::chrono::nanoseconds(1));
10+
std::this_thread::sleep_for(std::chrono::microseconds(1));
1111
}
1212
}
13-
BENCHMARK(BM_sleep_1ns);
13+
BENCHMARK(BM_sleep_1us);
1414

15-
static void BM_sleep_100ns(benchmark::State& state) {
15+
static void BM_sleep_10us(benchmark::State& state) {
1616
for (auto _ : state) {
17-
std::this_thread::sleep_for(std::chrono::nanoseconds(100));
17+
std::this_thread::sleep_for(std::chrono::microseconds(10));
1818
}
1919
}
20-
BENCHMARK(BM_sleep_100ns);
20+
BENCHMARK(BM_sleep_10us);
2121

22-
static void BM_sleep_1us(benchmark::State& state) {
22+
static void BM_sleep_50us(benchmark::State& state) {
2323
for (auto _ : state) {
24-
std::this_thread::sleep_for(std::chrono::microseconds(1));
24+
std::this_thread::sleep_for(std::chrono::microseconds(50));
2525
}
2626
}
27-
BENCHMARK(BM_sleep_1us);
27+
BENCHMARK(BM_sleep_50us);
2828

2929
static void BM_sleep_100us(benchmark::State& state) {
3030
for (auto _ : state) {

0 commit comments

Comments
 (0)