Skip to content

Latest commit

 

History

History
298 lines (162 loc) · 7.99 KB

exometer_util.md

File metadata and controls

298 lines (162 loc) · 7.99 KB

Module exometer_util

Exometer utility functions.

Data Types


timestamp() = non_neg_integer()

Function Index

clear_event_flag/2
drop_duplicates/1 drop_duplicates/1 will drop all duplicate elements from a list of tuples identified by their first element.
ensure_all_started/1
get_datapoints/1
get_env/2
get_opt/2
get_opt/3
get_statistics/1
get_statistics/3Calculate statistics from a sorted list of values.
get_statistics2/4
get_status/1
histogram/1
histogram/2
perc/2
pick_items/2Pick values from specified positions in a sorted list of numbers.
report_type/3
seed/0
seed/0
seed/1
seed/1
seed0/0
seed0/0
set_call_count/2
set_call_count/3
set_event_flag/2
set_status/2
table/0
tables/0
test_event_flag/2
timestamp/0Generate a millisecond-resolution timestamp.
timestamp_to_datetime/1Convert timestamp to a regular datetime.
uniform/0
uniform/0
uniform/1
uniform/1

Function Details

clear_event_flag/2

clear_event_flag(X1, St) -> any()

drop_duplicates/1


drop_duplicates(List0::[tuple()]) -> [tuple()]

drop_duplicates/1 will drop all duplicate elements from a list of tuples identified by their first element. Elements which are not tuples will be dropped as well. If called with a non-list argument, the argument is returned as is.

ensure_all_started/1


ensure_all_started(App::atom()) -> {ok, [atom()]} | {error, term()}

get_datapoints/1

get_datapoints(Exometer_entry) -> any()

get_env/2

get_env(Key, Default) -> any()

get_opt/2

get_opt(K, Opts) -> any()

get_opt/3

get_opt(K, Opts, Default) -> any()

get_statistics/1

get_statistics(Values) -> any()

get_statistics/3


get_statistics(Length::non_neg_integer(), Total::non_neg_integer(), Sorted::list()) -> [{atom(), number()}]

Calculate statistics from a sorted list of values.

This function assumes that you have already sorted the list, and now the number and sum of the elements in the list.

The stats calculated are min, max, mean, median and the 50th, 75th, 90th, 95th, 99th, and 99.9th percentiles (note that the 99.9th percentile is labeled 999).

This function is similar to bear:get_statistics_subset/2. mean refers to the arithmetic mean.

Fulpatchad med min/max av Magnus Feuer.

get_statistics2/4

get_statistics2(L, Sorted, Total, Mean) -> any()

get_status/1

get_status(St) -> any()

histogram/1

histogram(Values) -> any()

histogram/2

histogram(Values, DataPoints) -> any()

perc/2

perc(P, Len) -> any()

pick_items/2


pick_items(Vals::[number()], Items::[{atom() | integer(), integer()}]) -> [{atom(), number()}]

Pick values from specified positions in a sorted list of numbers.

This function is used to extract datapoints (usually percentiles) from a sorted list of values. Items is a list of {Datapoint, Position} entries.

report_type/3

report_type(Key, Extra, TypeMap) -> any()

seed/0

seed() -> any()

seed/0

seed() -> any()

seed/1

seed(X1) -> any()

seed/1

seed(X1) -> any()

seed0/0

seed0() -> any()

seed0/0

seed0() -> any()

set_call_count/2

set_call_count(X1, Bool) -> any()

set_call_count/3

set_call_count(M, F, Bool) -> any()

set_event_flag/2

set_event_flag(X1, St) -> any()

set_status/2

set_status(X1, St) -> any()

table/0

table() -> any()

tables/0

tables() -> any()

test_event_flag/2

test_event_flag(X1, St) -> any()

timestamp/0


timestamp() -> timestamp()

Generate a millisecond-resolution timestamp.

This timestamp format is used e.g. by the exometer_slide and exometer_histogram implementations.

timestamp_to_datetime/1


timestamp_to_datetime(TS::timestamp()) -> {calendar:datetime(), non_neg_integer()}

Convert timestamp to a regular datetime.

The timestamp is expected

uniform/0

uniform() -> any()

uniform/0

uniform() -> any()

uniform/1

uniform(N) -> any()

uniform/1

uniform(N) -> any()