Commit f139f4d1 authored by Matthias Werner's avatar Matthias Werner

improved verbose output and added precision type to result file.

parent 23263842
......@@ -38,23 +38,30 @@ struct Results
};
struct Output {
// @todo output filename as parameter
// @todo output filename as parameter and verbosity flag
template<typename TExtent>
static void write(const Results& results, const TExtent& extents, const std::string& title, const std::string& test_suite_name) {
std::stringstream ss;
int i_stats = results.stats.getLength()-1;
// output on console
std::cout << test_suite_name << " " << title << " "
<< extents.size() << "D @ " << results.alloc_mem_in_bytes / 1048576.0
<< "+" << results.plan_mem_in_bytes / 1048576.0
<< " MiB"
<< " took " << results.stats.getAverage(i_stats) << results.stats.getUnit(i_stats)
<< " (" << results.stats.getLabel(i_stats) << ")"
<< extents.size()
<< "D";
for(const auto& e : extents)
std::cout << ", "<<e;
std::cout << ", DevAllocs " << results.alloc_mem_in_bytes / 1048576.0
<< '+' << results.plan_mem_in_bytes / 1048576.0
<< " MiB, "
<< results.stats.getLabel(i_stats) << " = "
<< results.stats.getAverage(i_stats) << results.stats.getUnit(i_stats)
<< std::endl;
ss <<'\"'<< test_suite_name << '\"'
<< ",\"" << title <<"_"<< extents.size() << "D" << '\"'
<< ",\"Precision\"," << BOOST_PP_STRINGIZE(BENCH_PRECISION)
<< ",\"AllocBuffer\"," << results.alloc_mem_in_bytes / 1048576.0 << ",\"MiB\""
<< ",\"AllocPlan\"," << results.plan_mem_in_bytes / 1048576.0 << ",\"MiB\"";
<< ",\"AllocPlan\"," << results.plan_mem_in_bytes / 1048576.0 << ",\"MiB\""
<< ",\"Extent\"";
for(const auto& e : extents)
ss << ',' << e;
ss << std::endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment