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