Skip to content
Snippets Groups Projects
Commit 12072f59 authored by Juergen Hannappel's avatar Juergen Hannappel
Browse files

Merge branch 'columnheaders' into 'main'

add column headers to timing files

See merge request !1
parents 4038ee92 8ec3eed0
Branches
No related tags found
1 merge request!1add column headers to timing files
......@@ -7,13 +7,18 @@
namespace timed {
decltype(anchor::expextedNumberOfEvents) anchor::expextedNumberOfEvents=0;
static options::container<std::string> prefixData('p',"prefixData","data prepended to output lines");
static options::map<std::string> prefixData('p',"prefixData","data prepended to output lines");
void anchor::write(const std::string& outputDir, unsigned threadNo) {
std::ofstream out(outputDir + "/" + function + "-" + subfunc + "-" + std::to_string(threadNo) + ".dat");
out << std::fixed;
out.precision(9);
for (const auto& item: prefixData) {
out << item.first << " ";
}
out << "start duration size\n";
double tmin = std::chrono::duration<double>::max().count();
double tmax = std::chrono::duration<double>::min().count();
double tsum = 0;
......@@ -22,7 +27,7 @@ namespace timed {
dts.reserve(data.size());
for (const auto& m: data) {
for (const auto& item: prefixData) {
out << item << " ";
out << item.second << " ";
}
auto dt = std::chrono::duration_cast<std::chrono::duration<double>>(m.stop - m.start).count();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment