Skip to content

Commit

Permalink
Merge pull request #583 from jjcasmar/master
Browse files Browse the repository at this point in the history
Export thread id data in CSV
  • Loading branch information
wolfpld authored Jul 19, 2023
2 parents 18f37ec + 3d72329 commit 0e26b9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion csvexport/src/csvexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ int main(int argc, char** argv)
if (args.unwrap)
{
columns = {
"name", "src_file", "src_line", "ns_since_start", "exec_time_ns"
"name", "src_file", "src_line", "ns_since_start", "exec_time_ns", "thread"
};
}
else
Expand Down Expand Up @@ -301,6 +301,7 @@ int main(int argc, char** argv)
int i = 0;
for (const auto& zone_thread_data : zone_data.zones) {
const auto zone_event = zone_thread_data.Zone();
const auto tId = zone_thread_data.Thread();
const auto start = zone_event->Start();
const auto end = zone_event->End();

Expand All @@ -311,6 +312,7 @@ int main(int argc, char** argv)
timespan -= GetZoneChildTimeFast(worker, *zone_event);
}
values[4] = std::to_string(timespan);
values[5] = std::to_string(tId);

std::string row = join(values, args.separator);
printf("%s\n", row.data());
Expand Down

0 comments on commit 0e26b9e

Please sign in to comment.