Skip to content

Commit 3da7cd2

Browse files
committed
bench: explicitly make all current benchmarks "high" priority
no-functional changes. Only have set the priority level explicitly on every BENCHMARK macro call.
1 parent 05b8c76 commit 3da7cd2

33 files changed

+95
-95
lines changed

src/bench/addrman.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void AddrManAddThenGood(benchmark::Bench& bench)
133133
});
134134
}
135135

136-
BENCHMARK(AddrManAdd);
137-
BENCHMARK(AddrManSelect);
138-
BENCHMARK(AddrManGetAddr);
139-
BENCHMARK(AddrManAddThenGood);
136+
BENCHMARK(AddrManAdd, benchmark::PriorityLevel::HIGH);
137+
BENCHMARK(AddrManSelect, benchmark::PriorityLevel::HIGH);
138+
BENCHMARK(AddrManGetAddr, benchmark::PriorityLevel::HIGH);
139+
BENCHMARK(AddrManAddThenGood, benchmark::PriorityLevel::HIGH);

src/bench/base58.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ static void Base58Decode(benchmark::Bench& bench)
5050
}
5151

5252

53-
BENCHMARK(Base58Encode);
54-
BENCHMARK(Base58CheckEncode);
55-
BENCHMARK(Base58Decode);
53+
BENCHMARK(Base58Encode, benchmark::PriorityLevel::HIGH);
54+
BENCHMARK(Base58CheckEncode, benchmark::PriorityLevel::HIGH);
55+
BENCHMARK(Base58Decode, benchmark::PriorityLevel::HIGH);

src/bench/bech32.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ static void Bech32Decode(benchmark::Bench& bench)
3232
}
3333

3434

35-
BENCHMARK(Bech32Encode);
36-
BENCHMARK(Bech32Decode);
35+
BENCHMARK(Bech32Encode, benchmark::PriorityLevel::HIGH);
36+
BENCHMARK(Bech32Decode, benchmark::PriorityLevel::HIGH);

src/bench/bench.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class BenchRunner
7676
} // namespace benchmark
7777

7878
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_11foo("foo", foo, priority_level);
79-
#define BENCHMARK(n) \
80-
benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n, benchmark::PriorityLevel::HIGH);
79+
#define BENCHMARK(n, priority_level) \
80+
benchmark::BenchRunner PASTE2(bench_, PASTE2(__LINE__, n))(STRINGIZE(n), n, priority_level);
8181

8282
#endif // BITCOIN_BENCH_BENCH_H

src/bench/block_assemble.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ static void AssembleBlock(benchmark::Bench& bench)
4747
});
4848
}
4949

50-
BENCHMARK(AssembleBlock);
50+
BENCHMARK(AssembleBlock, benchmark::PriorityLevel::HIGH);

src/bench/ccoins_caching.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ static void CCoinsCaching(benchmark::Bench& bench)
5151
ECC_Stop();
5252
}
5353

54-
BENCHMARK(CCoinsCaching);
54+
BENCHMARK(CCoinsCaching, benchmark::PriorityLevel::HIGH);

src/bench/chacha20.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ static void CHACHA20_1MB(benchmark::Bench& bench)
3939
CHACHA20(bench, BUFFER_SIZE_LARGE);
4040
}
4141

42-
BENCHMARK(CHACHA20_64BYTES);
43-
BENCHMARK(CHACHA20_256BYTES);
44-
BENCHMARK(CHACHA20_1MB);
42+
BENCHMARK(CHACHA20_64BYTES, benchmark::PriorityLevel::HIGH);
43+
BENCHMARK(CHACHA20_256BYTES, benchmark::PriorityLevel::HIGH);
44+
BENCHMARK(CHACHA20_1MB, benchmark::PriorityLevel::HIGH);

src/bench/chacha_poly_aead.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ static void HASH_1MB(benchmark::Bench& bench)
115115
HASH(bench, BUFFER_SIZE_LARGE);
116116
}
117117

118-
BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT);
119-
BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT);
120-
BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT);
121-
BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT);
122-
BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT);
123-
BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT);
124-
BENCHMARK(HASH_64BYTES);
125-
BENCHMARK(HASH_256BYTES);
126-
BENCHMARK(HASH_1MB);
118+
BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ONLY_ENCRYPT, benchmark::PriorityLevel::HIGH);
119+
BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ONLY_ENCRYPT, benchmark::PriorityLevel::HIGH);
120+
BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ONLY_ENCRYPT, benchmark::PriorityLevel::HIGH);
121+
BENCHMARK(CHACHA20_POLY1305_AEAD_64BYTES_ENCRYPT_DECRYPT, benchmark::PriorityLevel::HIGH);
122+
BENCHMARK(CHACHA20_POLY1305_AEAD_256BYTES_ENCRYPT_DECRYPT, benchmark::PriorityLevel::HIGH);
123+
BENCHMARK(CHACHA20_POLY1305_AEAD_1MB_ENCRYPT_DECRYPT, benchmark::PriorityLevel::HIGH);
124+
BENCHMARK(HASH_64BYTES, benchmark::PriorityLevel::HIGH);
125+
BENCHMARK(HASH_256BYTES, benchmark::PriorityLevel::HIGH);
126+
BENCHMARK(HASH_1MB, benchmark::PriorityLevel::HIGH);

src/bench/checkblock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ static void DeserializeAndCheckBlockTest(benchmark::Bench& bench)
5050
});
5151
}
5252

53-
BENCHMARK(DeserializeBlockTest);
54-
BENCHMARK(DeserializeAndCheckBlockTest);
53+
BENCHMARK(DeserializeBlockTest, benchmark::PriorityLevel::HIGH);
54+
BENCHMARK(DeserializeAndCheckBlockTest, benchmark::PriorityLevel::HIGH);

src/bench/checkqueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
7070
queue.StopWorkerThreads();
7171
ECC_Stop();
7272
}
73-
BENCHMARK(CCheckQueueSpeedPrevectorJob);
73+
BENCHMARK(CCheckQueueSpeedPrevectorJob, benchmark::PriorityLevel::HIGH);

0 commit comments

Comments
 (0)