Benchmark: add default benchmark parameters, nsamples and bench_num
Context
The same default options for octez-snoop benchmark
(specifically, --nsamples=3000
, --bench-num=300
) are used for all benchmarks currently.
But the proper default options differ in some cases, for example, the timer latency and intercept cases.
Major Changes
- Add
type iterations = {nsamples: int; bench_number: int}
andval default_iterations : iterations
toBenchmark
module - Set
default_iterations
to each benchmark- Set
{nsamples=10000; bench_number=1}
to the time latency,{nsamples=3000; bench_number=1}
to intercept cases, and{nsamples=3000; bench_number=300}
to the other benchmarks - If options are given, override them and use their values
- Set
- Add a printing of
iterations
when executingoctez-snoop benchmark
such as below-
Measure.pp_options
prints them asnsamples/bench
andbench #
whereas my printer prints iterations asnsamples
andbench_number
.- It is better to unify the names but to which?
-
Benchmarking with the following options:
{ options = { seed=None;
bench #=None;
nsamples/bench=100;
minor_heap_size=None;
config directory=None };
save_file = ./works/sha3;
storage = Mem }
Iterations:
{ "nsamples": 3000, "bench_number": 100 }
Using default configuration ..
Manually testing the MR
Execute octez-snoop benchmark
with or without options --bench-num
and --nsamples
and check its output
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by taiseiKMC