in ResultParser/ResultParser.cpp [867:1011]
void ResultParser::_PrintSection(_SectionEnum section, const TimeSpan& timeSpan, const Results& results)
{
double fTime = PerfTimer::PerfTimeToSeconds(results.ullTimeCount);
double fBucketTime = timeSpan.GetIoBucketDurationInMilliseconds() / 1000.0;
UINT64 ullTotalBytesCount = 0;
UINT64 ullTotalIOCount = 0;
Histogram<float> totalLatencyHistogram;
IoBucketizer totalIoBucketizer;
_PrintSectionFieldNames(timeSpan);
_PrintSectionBorderLine(timeSpan);
for (unsigned int iThread = 0; iThread < results.vThreadResults.size(); ++iThread)
{
const ThreadResults& threadResults = results.vThreadResults[iThread];
for (unsigned int iFile = 0; iFile < threadResults.vTargetResults.size(); iFile++)
{
const TargetResults& targetResults = threadResults.vTargetResults[iFile];
UINT64 ullBytesCount = 0;
UINT64 ullIOCount = 0;
Histogram<float> latencyHistogram;
IoBucketizer ioBucketizer;
if ((section == _SectionEnum::WRITE) || (section == _SectionEnum::TOTAL))
{
ullBytesCount += targetResults.ullWriteBytesCount;
ullIOCount += targetResults.ullWriteIOCount;
if (timeSpan.GetMeasureLatency())
{
latencyHistogram.Merge(targetResults.writeLatencyHistogram);
totalLatencyHistogram.Merge(targetResults.writeLatencyHistogram);
}
if (timeSpan.GetCalculateIopsStdDev())
{
ioBucketizer.Merge(targetResults.writeBucketizer);
totalIoBucketizer.Merge(targetResults.writeBucketizer);
}
}
if ((section == _SectionEnum::READ) || (section == _SectionEnum::TOTAL))
{
ullBytesCount += targetResults.ullReadBytesCount;
ullIOCount += targetResults.ullReadIOCount;
if (timeSpan.GetMeasureLatency())
{
latencyHistogram.Merge(targetResults.readLatencyHistogram);
totalLatencyHistogram.Merge(targetResults.readLatencyHistogram);
}
if (timeSpan.GetCalculateIopsStdDev())
{
ioBucketizer.Merge(targetResults.readBucketizer);
totalIoBucketizer.Merge(targetResults.readBucketizer);
}
}
_Print("%6u | %15llu | %12llu | %10.2f | %10.2f",
iThread,
ullBytesCount,
ullIOCount,
(double)ullBytesCount / 1024 / 1024 / fTime,
(double)ullIOCount / fTime);
if (timeSpan.GetMeasureLatency())
{
double avgLat = latencyHistogram.GetAvg()/1000;
_Print(" | %8.3f", avgLat);
}
if (timeSpan.GetCalculateIopsStdDev())
{
double iopsStdDev = ioBucketizer.GetStandardDeviationIOPS() / fBucketTime;
_Print(" | %10.2f", iopsStdDev);
}
if (timeSpan.GetMeasureLatency())
{
if (latencyHistogram.GetSampleSize() > 0)
{
double latStdDev = latencyHistogram.GetStandardDeviation() / 1000;
_Print(" | %8.3f", latStdDev);
}
else
{
_Print(" | N/A");
}
}
_Print(" | %s (", targetResults.sPath.c_str());
_DisplayFileSize(targetResults.ullFileSize);
_Print(")\n");
ullTotalBytesCount += ullBytesCount;
ullTotalIOCount += ullIOCount;
}
}
_PrintSectionBorderLine(timeSpan);
double totalAvgLat = 0;
if (timeSpan.GetMeasureLatency())
{
totalAvgLat = totalLatencyHistogram.GetAvg()/1000;
}
_Print("total: %15llu | %12llu | %10.2f | %10.2f",
ullTotalBytesCount,
ullTotalIOCount,
(double)ullTotalBytesCount / 1024 / 1024 / fTime,
(double)ullTotalIOCount / fTime);
if (timeSpan.GetMeasureLatency())
{
_Print(" | %8.3f", totalAvgLat);
}
if (timeSpan.GetCalculateIopsStdDev())
{
double iopsStdDev = totalIoBucketizer.GetStandardDeviationIOPS() / fBucketTime;
_Print(" | %10.2f", iopsStdDev);
}
if (timeSpan.GetMeasureLatency())
{
if (totalLatencyHistogram.GetSampleSize() > 0)
{
double latStdDev = totalLatencyHistogram.GetStandardDeviation() / 1000;
_Print(" | %8.3f", latStdDev);
}
else
{
_Print(" | N/A");
}
}
_Print("\n");
}