Merge branch 'codspeed-benchmarks' into scheduler-process-to-add-fast-path

This commit is contained in:
J. Nick Koston
2026-03-17 01:45:03 -10:00
committed by GitHub
3 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -332,8 +332,8 @@ jobs:
run: |
. venv/bin/activate
export BENCHMARK_LIB_CONFIG=$(python script/setup_codspeed_lib.py)
# --build-only prints the binary path as the last line of stdout
BINARY=$(script/cpp_benchmark.py --all --build-only | tail -1)
# --build-only prints BUILD_BINARY=<path> to stdout
BINARY=$(script/cpp_benchmark.py --all --build-only | grep '^BUILD_BINARY=' | tail -1 | cut -d= -f2-)
echo "binary=$BINARY" >> $GITHUB_OUTPUT
- name: Run CodSpeed benchmarks
+1 -1
View File
@@ -389,7 +389,7 @@ def build_and_run(
return exit_code
if build_only:
print(program_path)
print(f"BUILD_BINARY={program_path}")
return EXIT_OK
# Run the binary
+7 -3
View File
@@ -111,16 +111,20 @@ static void Scheduler_SetInterval(benchmark::State &state) {
}
BENCHMARK(Scheduler_SetInterval);
// --- Scheduler: defer registration ---
// --- Scheduler: defer registration (set_timeout with delay=0) ---
static void Scheduler_Defer(benchmark::State &state) {
Scheduler scheduler;
Component dummy_component;
// defer() is Component::defer which calls set_timeout(delay=0).
// Call set_timeout directly since defer() is protected.
for (auto _ : state) {
for (int i = 0; i < kInnerIterations; i++) {
dummy_component.defer(static_cast<uint32_t>(i % 5), []() {});
scheduler.set_timeout(&dummy_component, static_cast<uint32_t>(i % 5), 0, []() {});
}
benchmark::DoNotOptimize(dummy_component);
scheduler.process_to_add();
benchmark::DoNotOptimize(scheduler);
}
state.SetItemsProcessed(state.iterations() * kInnerIterations);
}