Skip to content

Commit f16ff50

Browse files
committed
Fix few more things
1 parent 5368f20 commit f16ff50

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/bench/bench_dash.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ static fs::path SetDataDir()
3535
}
3636
static void SetupBenchArgs()
3737
{
38+
gArgs.AddArg("-?", "Print this help message and exit", false, OptionsCategory::OPTIONS);
3839
gArgs.AddArg("-list", "List benchmarks without executing them", false, OptionsCategory::OPTIONS);
3940
gArgs.AddArg("-filter=<regex>", strprintf("Regular expression filter to select benchmark by name (default: %s)", DEFAULT_BENCH_FILTER), false, OptionsCategory::OPTIONS);
4041
gArgs.AddArg("-asymptote=n1,n2,n3,...", strprintf("Test asymptotic growth of the runtime of an algorithm, if supported by the benchmark"), false, OptionsCategory::OPTIONS);
4142
gArgs.AddArg("-output_csv=<output.csv>", "Generate CSV file with the most important benchmark results.", false, OptionsCategory::OPTIONS);
4243
gArgs.AddArg("-output_json=<output.json>", "Generate JSON file with all benchmark results.", false, OptionsCategory::OPTIONS);
44+
45+
// Hidden
46+
gArgs.AddArg("-h", "", false, OptionsCategory::HIDDEN);
47+
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
4348
}
4449

4550
// parses a comma separated list like "10,20,30,50"
@@ -66,7 +71,7 @@ int main(int argc, char** argv)
6671

6772
if (HelpRequested(gArgs)) {
6873
std::cout << gArgs.GetHelpMessage();
69-
return 0;
74+
return EXIT_SUCCESS;
7075
}
7176

7277
// Set the datadir after parsing the bench options
@@ -101,5 +106,5 @@ int main(int argc, char** argv)
101106

102107
ECC_Stop();
103108

104-
return 0;
109+
return EXIT_SUCCESS;
105110
}

src/bench/examples.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@
44

55
#include <bench/bench.h>
66
#include <validation.h>
7-
#include <util/time.h>
8-
9-
// Sanity test: this should loop ten times, and
10-
// min/max/average should be close to 100ms.
11-
static void Sleep100ms(benchmark::Bench& bench)
12-
{
13-
bench.run([&] {
14-
MilliSleep(100);
15-
});
16-
}
17-
18-
BENCHMARK(Sleep100ms);
197

208
// Extremely fast-running benchmark:
219
#include <math.h>

0 commit comments

Comments
 (0)