Skip to content

Commit

Permalink
Merge pull request #29263 from fwyzard/FastTimerService_write_JSON_file
Browse files Browse the repository at this point in the history
FastTimerService: include in the JSON file a description of the available metrics
  • Loading branch information
cmsbuild committed Mar 22, 2020
2 parents 27d955a + f921fe3 commit d4612cc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions HLTrigger/Timer/plugins/FastTimerService.cc
Expand Up @@ -1352,6 +1352,13 @@ json FastTimerService::encodeToJSON(edm::ModuleDescription const& module, Resour

void FastTimerService::writeSummaryJSON(ResourcesPerJob const& data, std::string const& filename) const {
json j;

// write a description of the resources
j["resources"] = json::array({json{{"time_real", "real time"}},
json{{"time_thread", "cpu time"}},
json{{"mem_alloc", "allocated memory"}},
json{{"mem_free", "deallocated memory"}}});

// write the resources used by the job
j["total"] = encodeToJSON("Job", callgraph_.processDescription(0).name_, data.events, data.total + data.overhead);

Expand Down

0 comments on commit d4612cc

Please sign in to comment.