Module erlperf_file_log

Writes monitoring events to I/O device.

Copyright © (C) 2019-2022, Maxim Fedorov

Behaviours: gen_server.

Description

Writes monitoring events to I/O device.

Function Index

format_duration/1Formats time duration, from nanoseconds to seconds Example: 88 -> 88 ns, 88000 -> 88 us, 10000000 -> 10 ms.
format_number/1Formats number rounded to 3 digits.
format_size/1Formats size (bytes) rounded to 3 digits.
handle_call/3
handle_cast/2
handle_info/2
init/1
start_link/1 Starts the server.

Function Details

format_duration/1

format_duration(Num::non_neg_integer()) -> string()

Formats time duration, from nanoseconds to seconds Example: 88 -> 88 ns, 88000 -> 88 us, 10000000 -> 10 ms

format_number/1

format_number(Num::non_neg_integer()) -> string()

Formats number rounded to 3 digits. Example: 88 -> 88, 880000 -> 880 Ki, 100501 -> 101 Ki

format_size/1

format_size(Num::non_neg_integer()) -> string()

Formats size (bytes) rounded to 3 digits. Unlike @see format_number, used 1024 as a base, so 200 * 1024 is 200 Kb.

handle_call/3

handle_call(Request, From, State) -> any()

handle_cast/2

handle_cast(Request, State) -> any()

handle_info/2

handle_info(X1, State) -> any()

init/1

init(X1) -> any()

start_link/1

start_link(Filename::string() | file:io_device()) -> {ok, Pid::pid()} | {error, Reason::term()}

Starts the server


Generated by EDoc