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