]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Show --benchmark_cooldown in benchmark_zlib --help output
authorNathan Moinvaziri <nathan@nathanm.com>
Sun, 17 May 2026 02:14:58 +0000 (19:14 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 20 May 2026 21:17:25 +0000 (23:17 +0200)
Use the custom help printer callback in benchmark::Initialize to
append the --benchmark_cooldown flag to the standard help text.

test/benchmarks/benchmark_main.cc

index 90c949d96daf8b9d0e6babc172690cc9c6f510d7..191773527373ef9ac6410ae1784e056fe915a14e 100644 (file)
@@ -82,7 +82,10 @@ int main(int argc, char** argv) {
         }
     }
 
-    ::benchmark::Initialize(&argc, argv);
+    ::benchmark::Initialize(&argc, argv, []() {
+        ::benchmark::PrintDefaultHelp();
+        printf("          [--benchmark_cooldown=<seconds>]\n");
+    });
 
     if (cooldown_secs > 0) {
         benchmark::BenchmarkReporter *display = benchmark::CreateDefaultDisplayReporter();