Skip to content

Commit f617bc0

Browse files
committed
[libc++] Disable atomic_wait benchmarks outside of dry-run mode
The atomic_wait benchmarks are great, but they tend to overload the system they're running on. For that reason, we can't run them on our CI infrastructure on a regular basis. Instead of removing them, make them unsupported outside of dry-running, which allows keeping the benchmarks around and ensuring they don't rot, but doesn't run them along with the other benchmarks. If we need to investigate atomic_wait performance, it's trivial to mark the benchmark as supported and run it for local investigations. This is an alternative to #158289.
1 parent d0263f0 commit f617bc0

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

libcxx/test/benchmarks/atomic_wait_1_waiter_1_notifier.bench.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010

11+
// This benchmark is very expensive and we don't want to run it on a regular basis,
12+
// only to ensure the code doesn't rot.
13+
// REQUIRES: enable-benchmarks=dry-run
14+
1115
#include "atomic_wait_helper.h"
1216

1317
#include <atomic>

libcxx/test/benchmarks/atomic_wait_N_waiter_N_notifier.bench.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010

11+
// This benchmark is very expensive and we don't want to run it on a regular basis,
12+
// only to ensure the code doesn't rot.
13+
// REQUIRES: enable-benchmarks=dry-run
14+
1115
#include "atomic_wait_helper.h"
1216

1317
#include <atomic>

libcxx/test/benchmarks/atomic_wait_multi_waiter_1_notifier.bench.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010

11+
// This benchmark is very expensive and we don't want to run it on a regular basis,
12+
// only to ensure the code doesn't rot.
13+
// REQUIRES: enable-benchmarks=dry-run
14+
1115
#include "atomic_wait_helper.h"
1216

1317
#include <atomic>

libcxx/test/benchmarks/atomic_wait_vs_mutex_lock.bench.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010

11+
// This benchmark is very expensive and we don't want to run it on a regular basis,
12+
// only to ensure the code doesn't rot.
13+
// REQUIRES: enable-benchmarks=dry-run
14+
1115
#include <atomic>
1216
#include <cstdint>
1317
#include <mutex>

0 commit comments

Comments
 (0)