View Source erlperf_history (erlperf v2.2.0)
Collects, accumulates & filters cluster-wide monitoring events. Essentially a simple in-memory database for quick cluster overview.
History server helps to collect monitoring reports from multiple nodes of a single Erlang cluster. Example setup: single primary node running erlperf_history
and erlperf_cluster_monitor
listens to reports sent by several more nodes in a cluster, running continuous benchmarking jobs. Nodes may run the same Erlang code, but using different hardware or OS version. Or, conversely, same hardware and OS, but variants of Erlang code. See erlperf_cluster_monitor
for a code sample.
Link to this section Summary
Functions
Returns cluster history.
Returns cluster history reports between From and To (inclusive).
Equivalent to start_link(120000).
Starts the history server and links it to the calling process.
Link to this section Functions
-spec get(From :: integer()) -> [{Time :: non_neg_integer(), erlperf_monitor:monitor_sample()}].
Returns cluster history.
Returns all reports sinceFrom
timestamp to now, sorted by timestamp. From
is wall clock time, in milliseconds (e.g. os:system_time(millisecond)
).
-spec get(From :: integer(), To :: integer()) -> [{Time :: non_neg_integer(), erlperf_monitor:monitor_sample()}].
Returns cluster history reports between From and To (inclusive).
From
and To
are wall clock time, in milliseconds (e.g. os:system_time(millisecond)
).
-spec start_link() -> {ok, Pid :: pid()} | ignore | {error, Reason :: term()}.
Equivalent to start_link(120000).
-spec start_link(Duration :: pos_integer()) -> {ok, Pid :: pid()} | ignore | {error, Reason :: term()}.
Starts the history server and links it to the calling process.
Designed for use as a part of a supervision tree.Duration
is time (in milliseconds), how long to keep the reports for. Older reports are discarded.