if (show_time)
return t.localtime(os) << " ";
else
- return os << " ";
+ return os;
}
ostream& ObjBencher::out(ostream& os)
double bandwidth;
bandwidth = ((double)data.finished)*((double)data.object_size)/(double)timePassed;
bandwidth = bandwidth/(1024*1024); // we want it in MB/sec
- char bw[20];
- snprintf(bw, sizeof(bw), "%.3lf \n", bandwidth);
out(cout) << "Total time run: " << timePassed << std::endl
- << "Total writes made: " << data.finished << std::endl
- << "Write size: " << data.object_size << std::endl
- << "Bandwidth (MB/sec): " << bw << std::endl
- << "Stddev Bandwidth: " << vec_stddev(data.history.bandwidth) << std::endl
- << "Max bandwidth (MB/sec): " << data.idata.max_bandwidth << std::endl
- << "Min bandwidth (MB/sec): " << data.idata.min_bandwidth << std::endl
- << "Average IOPS: " << (int)(data.finished/timePassed) << std::endl
- << "Average Latency(s): " << data.avg_latency << std::endl
- << "Stddev Latency(s): " << vec_stddev(data.history.latency) << std::endl
- << "Max latency(s): " << data.max_latency << std::endl
- << "Min latency(s): " << data.min_latency << std::endl;
+ << "Total writes made: " << data.finished << std::endl
+ << "Write size: " << data.object_size << std::endl
+ << "Bandwidth (MB/sec): " << setprecision(6) << bandwidth << std::endl
+ << "Stddev Bandwidth: " << vec_stddev(data.history.bandwidth) << std::endl
+ << "Max bandwidth (MB/sec): " << data.idata.max_bandwidth << std::endl
+ << "Min bandwidth (MB/sec): " << data.idata.min_bandwidth << std::endl
+ << "Average IOPS: " << (int)(data.finished/timePassed) << std::endl
+ << "Average Latency(s): " << data.avg_latency << std::endl
+ << "Stddev Latency(s): " << vec_stddev(data.history.latency) << std::endl
+ << "Max latency(s): " << data.max_latency << std::endl
+ << "Min latency(s): " << data.min_latency << std::endl;
//write object size/number data for read benchmarks
::encode(data.object_size, b_write);
double bandwidth;
bandwidth = ((double)data.finished)*((double)data.object_size)/(double)runtime;
bandwidth = bandwidth/(1024*1024); // we want it in MB/sec
- char bw[20];
- snprintf(bw, sizeof(bw), "%.3lf \n", bandwidth);
- out(cout) << "Total time run: " << runtime << std::endl
+ out(cout) << "Total time run: " << runtime << std::endl
<< "Total reads made: " << data.finished << std::endl
- << "Read size: " << data.object_size << std::endl
- << "Bandwidth (MB/sec): " << setprecision(3) << bandwidth << std::endl
- << "Average IOPS " << (int)(data.finished/runtime) << std::endl
+ << "Read size: " << data.object_size << std::endl
+ << "Bandwidth (MB/sec): " << setprecision(6) << bandwidth << std::endl
+ << "Average IOPS: " << (int)(data.finished/runtime) << std::endl
<< "Average Latency(s): " << data.avg_latency << std::endl
<< "Max latency(s): " << data.max_latency << std::endl
<< "Min latency(s): " << data.min_latency << std::endl;
double bandwidth;
bandwidth = ((double)data.finished)*((double)data.object_size)/(double)runtime;
bandwidth = bandwidth/(1024*1024); // we want it in MB/sec
- char bw[20];
- snprintf(bw, sizeof(bw), "%.3lf \n", bandwidth);
- out(cout) << "Total time run: " << runtime << std::endl
+ out(cout) << "Total time run: " << runtime << std::endl
<< "Total reads made: " << data.finished << std::endl
- << "Read size: " << data.object_size << std::endl
- << "Bandwidth (MB/sec): " << setprecision(3) << bandwidth << std::endl
+ << "Read size: " << data.object_size << std::endl
+ << "Bandwidth (MB/sec): " << setprecision(6) << bandwidth << std::endl
<< "Average IOPS: " << (int)(data.finished/runtime) << std::endl
<< "Average Latency(s): " << data.avg_latency << std::endl
<< "Max latency(s): " << data.max_latency << std::endl