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