Authors: Maxim Fedorov (maximfca@gmail.com).
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()}
profile_options() = #{profiler => fprof, format => term | binary | string}
run_options() = #{concurrency => pos_integer(), sample_duration => pos_integer(), warmup => pos_integer(), samples => pos_integer(), cv => float(), report => extended, isolation => isolation()}
run_result() = non_neg_integer() | [non_neg_integer()]
compare/2 | Comparison run: starts several jobs and measures throughput for all of them at the same time. |
format/3 | |
format_number/1 | Formats number rounded to 3 digits. |
format_size/1 | Formats size (bytes) rounded to 3 digits. |
load/1 | Loads previously saved job (from file in the priv_dir). |
main/1 | Simple 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/1 | Simple case. |
run/2 | Single throughput measurement cycle. |
run/3 | Concurrency measurement run. |
start/2 | Starts a continuously running job in a new BEAM instance. |
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(Level::error | warining, Format::string(), Terms::[term()]) -> ok
format_number(Num::non_neg_integer()) -> string()
Formats number rounded to 3 digits. Example: 88 -> 88, 880000 -> 880 Ki, 100501 -> 101 Ki
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(Filename::file:filename()) -> ep_job:code()
Loads previously saved job (from file in the priv_dir)
main(Args::[string()]) -> no_return()
Simple command-line benchmarking interface. Example: erlperf 'rand:uniform().'
profile(Code::ep_job:code(), Options::profile_options()) -> binary() | string() | [term()]
Runs a profiler for specified code
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::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(Code::ep_job:code(), RunOptions::run_options()) -> run_result()
Single throughput measurement cycle. Additional options are applied.
run(Code::ep_job:code(), RunOptions::run_options(), ConTestOpts::concurrency_test()) -> concurrency_test_result()
Concurrency measurement run.
start(Code::ep_job:code(), Isolation::isolation()) -> {ok, node(), pid()}
Starts a continuously running job in a new BEAM instance.
Generated by EDoc