Module erlperf

Benchmark/squeeze implementation, does not start any permanent jobs.

Authors: Maxim Fedorov (maximfca@gmail.com).

Description

Benchmark/squeeze implementation, does not start any permanent jobs. Command line interface.

Data Types

concurrency_result()

concurrency_result() = {QPS::non_neg_integer(), Concurrency::non_neg_integer()}

concurrency_test()

concurrency_test() = #{threshold => pos_integer(), min => pos_integer(), max => pos_integer()}

concurrency_test_result()

concurrency_test_result() = concurrency_result() | {Max::concurrency_result(), [concurrency_result()]}

isolation()

isolation() = #{host => string()}

profile_options()

profile_options() = #{profiler => fprof, format => term | binary | string}

run_options()

run_options() = #{concurrency => pos_integer(), sample_duration => pos_integer(), warmup => pos_integer(), samples => pos_integer(), cv => float(), report => extended, isolation => isolation()}

run_result()

run_result() = non_neg_integer() | [non_neg_integer()]

Function Index

compare/2 Comparison run: starts several jobs and measures throughput for all of them at the same time.
format/3
format_number/1Formats number rounded to 3 digits.
format_size/1Formats size (bytes) rounded to 3 digits.
load/1 Loads previously saved job (from file in the priv_dir).
main/1Simple command-line benchmarking interface.
profile/2 Runs a profiler for specified code.
record/4 Records call trace, so it could be used to benchmark later.
run/1Simple case.
run/2 Single throughput measurement cycle.
run/3 Concurrency measurement run.
start/2 Starts a continuously running job in a new BEAM instance.

Function Details

compare/2

compare(Codes::[ep_job: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.

format/3

format(Level::error | warining, Format::string(), Terms::[term()]) -> ok

format_number/1

format_number(Num::non_neg_integer()) -> string()

Formats number rounded to 3 digits. Example: 88 -> 88, 880000 -> 880 Ki, 100501 -> 101 Ki

format_size/1

format_size(Num::non_neg_integer()) -> string()

Formats size (bytes) rounded to 3 digits. Unlinke @see format_number, used 1024 as a base, so 200 * 1024 is 200 Kb.

load/1

load(Filename::file:filename()) -> ep_job:code()

Loads previously saved job (from file in the priv_dir)

main/1

main(Args::[string()]) -> no_return()

Simple command-line benchmarking interface. Example: erlperf 'rand:uniform().'

profile/2

profile(Code::ep_job:code(), Options::profile_options()) -> binary() | string() | [term()]

Runs a profiler for specified code

record/4

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/1

run(Code::ep_job: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/2

run(Code::ep_job:code(), RunOptions::run_options()) -> run_result()

Single throughput measurement cycle. Additional options are applied.

run/3

run(Code::ep_job:code(), RunOptions::run_options(), ConTestOpts::concurrency_test()) -> concurrency_test_result()

Concurrency measurement run.

start/2

start(Code::ep_job:code(), Isolation::isolation()) -> {ok, node(), pid()}

Starts a continuously running job in a new BEAM instance.


Generated by EDoc