./ct_report/coverage/mongoose_system_metrics_file.COVER.html

1 -module(mongoose_system_metrics_file).
2
3 -include("mongoose.hrl").
4
5 -export([location/0]).
6 -export([save/1]).
7
8 -spec location() -> string().
9 location() ->
10 171 LogDir = mongoose_logs:dir(),
11 171 LogDir ++ "/system_metrics_report.json".
12
13 -spec save([mongoose_system_metrics_collector:report_struct()]) -> ok.
14 save(Reports) ->
15 44 JSON = jiffy:encode(Reports, [pretty]),
16 44 file:write_file(location(), JSON),
17 44 ok.
Line Hits Source