Copyright © (C) 2019-2022, Maxim Fedorov
code() = erlperf_job:code_map() | erlperf_job:callable()
concurrency_result() = {QPS::non_neg_integer(), Concurrency::non_neg_integer()}
concurrency_test() = #{threshold => pos_integer(), min => pos_integer(), max => pos_integer()}
concurrency_test_result() = concurrency_result() | {Max::concurrency_result(), [concurrency_result()]}
isolation() = #{host => string()}
run_options() = #{concurrency => pos_integer(), sample_duration => pos_integer() | undefined, warmup => non_neg_integer(), samples => pos_integer(), cv => float(), report => extended, isolation => isolation()}
run_result() = non_neg_integer() | [non_neg_integer()]
benchmark/3 | Generic execution engine. |
compare/2 | Comparison run: starts several jobs and measures throughput for all of them at the same time. |
record/4 | Records call trace, so it could be used to benchmark later. |
run/1 | Simple case. |
run/2 | Single throughput measurement cycle. |
run/3 | Concurrency measurement run. |
start/2 | Starts a new continuously running job with the specified concurrency. |
time/2 | Low-overhead benchmarking, runs the code Count times and returns time in microseconds it took to execute the code. |
benchmark(Codes, Options, ConOpts) -> any()
Generic execution engine. Supply multiple code versions, run options and either
undefined
for usual benchmarking, or squeeze mode settings for concurrency test.
compare(Codes::[code()], RunOptions::run_options()) -> [run_result()]
Comparison run: starts several jobs and measures throughput for all of them at the same time. All job options are honoured, and if there is isolation applied, every job runs its own node.
record(Module::module(), Function::atom(), Arity::non_neg_integer(), TimeMs::pos_integer()) -> [[{module(), atom(), [term()]}]]
Records call trace, so it could be used to benchmark later.
run(Code::code()) -> non_neg_integer()
Simple case. Runs a single benchmark, and returns a steady QPS number. Job specification may include suite & worker init parts, suite cleanup, worker code, job name and identifier (id).
run(Code::code(), RunOptions::run_options()) -> run_result()
Single throughput measurement cycle. Additional options are applied.
run(Module::code() | module(), Function::run_options() | atom(), Args::concurrency_test() | [term()]) -> run_result() | concurrency_test_result()
Concurrency measurement run.
start(Code::code(), Concurrency::non_neg_integer()) -> pid()
Starts a new continuously running job with the specified concurrency.
Requires erlperf
application to be started.
time(Code::code(), Count::non_neg_integer()) -> TimeUs::non_neg_integer()
Low-overhead benchmarking, runs the code Count times and returns time in microseconds it took to execute the code.
Generated by EDoc