Skip to content

Commit

Permalink
Adding inclusive time to tasktree output.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Feb 6, 2023
1 parent 84a46e6 commit e4c7c28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/apex/dependency_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ double Node::writeNodeCSV(std::stringstream& outfile, double total, int node_id)
outfile << ((parent == nullptr) ? 0 : parent->index) << ",";
outfile << depth << ",\"";
outfile << data->get_tree_name() << "\",";
// write out the inclusive
// write out the accumulated
double acc = (data == task_identifier::get_main_task_id() || getAccumulated() == 0.0) ?
total : getAccumulated();
// write the number of calls
Expand All @@ -350,6 +350,7 @@ double Node::writeNodeCSV(std::stringstream& outfile, double total, int node_id)
double mean = acc / ncalls;
outfile << std::setprecision(9);
outfile << acc << ",";
outfile << inclusive << ",";
outfile << getMinimum() << ",";
outfile << mean << ",";
outfile << getMaximum() << ",";
Expand Down
2 changes: 1 addition & 1 deletion src/apex/profiler_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ std::unordered_set<profile*> free_profiles;
stringstream tree_stream;
if (node_id == 0) {
tree_stream << "\"process rank\",\"node index\",\"parent index\",\"depth\",";
tree_stream << "\"name\",\"calls\",\"threads\",\"total time(ns)\",";
tree_stream << "\"name\",\"calls\",\"threads\",\"total time(ns)\",\"inclusive time(ns)\",";
tree_stream << "\"minimum time(ns)\",\"mean time(ns)\",\"maximum time(ns)\",";
tree_stream << "\"stddev time(ns)\"";
for (auto& x : dependency::Node::getKnownMetrics()) {
Expand Down

0 comments on commit e4c7c28

Please sign in to comment.