View Source Command Line

Run erlperf with no arguments to get command line usage.

synopsis

Synopsis

erlperf [FLAG] runner [INIT] [INIT_RUNNER] [DONE] [runner...]

flags

Flags

ShortLongDescription
-c--concurrencySpecifies the number of workers per job. Allowed only in continuous mode
--cvCoefficient of variation. Accepted in continuous and concurrency estimation mode. Benchmark keeps running until standard deviation is below the specified number
-i--isolationRequests to run every benchmark in a separate Erlang VM for isolation purposes
-s--samplesNumber of samples to take. Defaults to 1 for timed mode, 3 for continuous and concurrency estimation
-d--sample_durationSample duration, in milliseconds, for continuous and concurrency estimation modes
-l--loopSample duration (iterations) for the timed mode. Engages timed mode when specified
--maxMaximum number of workers allowed in the concurrency estimation mode
--minStarting number of workers in concurrency estimation mode
-paAdds extra code path to the Erlang VM. Useful for benchmarking *.beam files on your filesystem
-r--reportRequests basic, extended or full report. Defaults to basic when less than 10 samples are requested, and extended for 10 and more
-q-squeezeEngages concurrency estimation mode
-t-thresholdSets number of extra workers to try in concurrency estimation mode before concluding the test
-v--verboseTurns on verbose mode, including generated source code, VM statistics and performance of continuous jobs)
-w--warmupWarmup

benchmark-code

Benchmark code

At least one runner code is required. Specify multiple runner codes to perform a comparison run.

Initialisation and cleanup definitions are read in the same order as runner codes. Example:

# first runner receives 1 as input, second - 2
erlperf --init_runner '1.' 'run(1) -> ok.' 'run(2) -> ok.' --init_runner '2.'
# next run fails with function_clause, because first runner receives '2', and second - 1
erlperf --init_runner '2.' 'run(1) -> ok.' 'run(2) -> ok.' --init_runner '1.' 
Description
--initJob initialisation code, see accepted callable formats below
--init_runnerWorker initialisation code
--doneJob cleanup code
--init_allDefault init code for all runners that do not have a specific code
--init_runner_allDefault init_runner code
--done_allDefault done code

Accepted callable formats:

  • valid Erlang code: timer:sleep(1).
  • valid Erlang function: run() -> timer:sleep(1).
  • function with arguments: run(X) -> timer:sleep(X).', 'run(X, Y) -> timer:sleep(X), Y.
  • tuple with module, function name and arguments: {timer, sleep, [1]}
  • file name with call chain recording: record.trace. deprecated, do not use