View Source BeamBenchmarks (beam_benchmarks v0.1.0)

BEAM Benchmarks

See functions for supported benchmarks.

Summary

Types

Options for running bencherl tests

Functions

Run bencherl's bang test

Run bencherl's big test

Return information about the device

Run bencherl's ehb test

Run estone_SUITE and pretty print the results

Run estone_SUITE benchmarks

Run bencherl's ets_random_ops test

Run bencherl's ets_test test

Run bencherl's genstress test

Run bencherl's mbrot test

Run bencherl's moves test

Run bencherl's orbit_int test

Run bencherl's parallel test

Run bencherl's pcmark test

Run bencherl's ran test

Run all bencherl tests

Run bencherl's serialmsg test

Run bencherl's timer_wheel test

Types

bencherl_options()

@type bencherl_options() :: [
  version: bencherl_version(),
  number_of_cores: non_neg_integer()
]

Options for running bencherl tests

  • version - run a :short, :intermediate, :long version. Default is :short.
  • number_of_cores - the number of cores to use. Default is the number of schedulers.

bencherl_version()

@type bencherl_version() :: :short | :intermediate | :long

estone_options()

@type estone_options() :: [{:data_dir, charlist()}]

Functions

bang(opts \\ [])

@spec bang(bencherl_options()) :: []

Run bencherl's bang test

A benchmark for many-to-one message passing that spawns one receiver and multiple senders that flood the receiver with messages.

big(opts \\ [])

@spec big(bencherl_options()) :: []

Run bencherl's big test

A benchmark that implements a many-to-many message passing scenario.

device_info()

@spec device_info() :: BeamBenchmarks.Info.t()

Return information about the device

ehb(opts \\ [])

@spec ehb(bencherl_options()) :: []

Run bencherl's ehb test

This is an implementation of hackbench in Erlang, a benchmark and stress test for Linux schedulers.

estone(opts \\ [])

@spec estone(estone_options()) :: {:comment, charlist()}

Run estone_SUITE and pretty print the results

This is a suite of benchmarks that measure performance of various Erlang primitives.

See estone_bench/1 for machine readable results.

estone_bench(opts \\ [])

@spec estone_bench(estone_options()) :: list()

Run estone_SUITE benchmarks

This is a suite of benchmarks that measure performance of various Erlang primitives.

ets_random_ops(opts \\ [])

@spec ets_random_ops(bencherl_options()) :: []

Run bencherl's ets_random_ops test

This benchmark creates an ETS table and spawns several readers and writers that perform a certain number of reads (lookups) and writes (inserts), respectively, to that table.

ets_test(opts \\ [])

@spec ets_test(bencherl_options()) :: []

Run bencherl's ets_test test

This benchmark creates an ETS table and spawns several readers and writers that perform a certain number of reads (lookups) and writes (inserts), respectively, to that table.

genstress(opts \\ [])

@spec genstress(bencherl_options()) :: []

Run bencherl's genstress test

This is a generic server benchmark that spawns an echo server and a number of clients.

mbrot(opts \\ [])

@spec mbrot(bencherl_options()) :: []

Run bencherl's mbrot test

This benchmark extrapolates the coordinates of a 2-D complex plane that correspond to the pixels of a 2-D image of a specific resolution.

moves(opts \\ [])

@spec moves(bencherl_options()) :: []

Run bencherl's moves test

Parallel benchmark program that solves the moves problem. A description of the moves problem can be found in the ETS implementation report that can be found here:

https://github.com/kjellwinblad/ets_impl_project

orbit_int(opts \\ [])

@spec orbit_int(bencherl_options()) :: []

Run bencherl's orbit_int test

This benchmark operates on a distributed hash table, and follows a master/worker architecture.

parallel(opts \\ [])

@spec parallel(bencherl_options()) :: []

Run bencherl's parallel test

A benchmark for parallel execution that spawns a number of processes, each of which creates a list of $N$ timestamps and, after it checks that each element of the list is strictly greater than its previous one (as promised by the implementation of erlang:now/0), it sends the result to its parent.

pcmark(opts \\ [])

@spec pcmark(bencherl_options()) :: []

Run bencherl's pcmark test

This benchmark is also about ETS operations. It creates five ETS tables, fills them with values, and then spawns a certain number of processes that read the contents of those tables and update them. As soon as one process finishes, a new process is spawned, until a certain total number of processes has been reached. The benchmark is parameterized by the number of initial processes and the total number of processes.

ran(opts \\ [])

@spec ran(bencherl_options()) :: []

Run bencherl's ran test

Another benchmark for parallel execution that spawns a certain number of processes, each of which generates a list of ten thousand random integers, sorts it and sends its first half to the parent process. The benchmark receives the number of processes as a parameter.

run_bencherl_test(test, opts \\ [])

@spec run_bencherl_test(module(), bencherl_options()) :: [map()]

run_bencherl_tests(opts \\ [])

@spec run_bencherl_tests(bencherl_options()) :: [non_neg_integer()]

Run all bencherl tests

serialmsg(opts \\ [])

@spec serialmsg(bencherl_options()) :: []

Run bencherl's serialmsg test

A benchmark about message proxying through a dispatcher. The benchmark spawns a certain number of receivers, one dispatcher, and a certain number of generators. The dispatcher forwards the messages that it receives from generators to the appropriate receiver. Each generator sends a number of messages to a specific receiver.

timer_wheel(opts \\ [])

@spec timer_wheel(bencherl_options()) :: []

Run bencherl's timer_wheel test

A timer management benchmark that spawns a certain number of processes that exchange ping and pong messages.