./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 98 LogDir = mongoose_logs:dir(),
11 98 LogDir ++ "/system_metrics_report.json".
12
13 -spec save([mongoose_system_metrics_collector:report_struct()]) -> ok.
14 save(Reports) ->
15 41 JSON = jiffy:encode(Reports, [pretty]),
16 41 file:write_file(location(), JSON),
17 41 ok.
Line Hits Source