Beamchmark (Beamchmark v0.1.0) View Source
Top level module providing Beamchmark.run API.
Beamchmark measures EVM performance while it is running user Beamchmark.Scenario.
Metrics being measured
Scheduler Utilization
At the moment, the main interest of Beamchmark is scheduler utilization which tells
how much given scheduler was busy.
Scheduler is busy when:
- Executing process code
- Executing linked-in driver or NIF code
- Executing BIFs, or any other runtime handling
- Garbage collecting
- Handling any other memory management
Scheduler utilization is measured using Erlang's :scheduler module which uses :erlang.statistics/1
under the hood and it is represented as a floating point value between 0.0 and 1.0 and percent.
Beamchmark measures following types of scheduler utilization:
- normal/cpu/io - average utilization of single scheduler of given type
- total normal/cpu/io - average utilization of all schedulers of given type. E.g total normal equals 1.0 when each of normal schedulers have been acive all the time
- total - average utilization of all schedulers
- weighted - average utilization of all schedulers weighted against maximum amount of available CPU time
For more information please refer to :erlang.statistics/1 (under :scheduler_wall_time) or :scheduler.utilization/1.
Other
Other metrics being measured:
- reductions - total reductions number
- context switches - total context switches number
Link to this section Summary
Types
Configuration for Beamchmark.
Functions
Runs scenario and benchmarks EVM performance.
Link to this section Types
Specs
options_t() :: [ duration: pos_integer(), delay: non_neg_integer(), output_dir: Path.t() ]
Configuration for Beamchmark.
- duration - time in seconds
Beamchmarkwill be benchmarking EVM. Defaults to 60 seconds. - delay - time in seconds
Beamchmarkwill wait after running scenario and before starting benchmarking. - output_dir - directory where results of benchmarking will be saved.
Link to this section Functions
Specs
run(Beamchmark.Scenario, options_t()) :: :ok
Runs scenario and benchmarks EVM performance.
Subsequent invocation of this function will also compare results with the previous ones.