/ (1024*1024)
/ cycleSinceChange;
else
- bandwidth = 0;
+ bandwidth = -1;
- if (!std::isnan(bandwidth) && bandwidth > 0) {
+ if (!std::isnan(bandwidth) && bandwidth > -1) {
if (bandwidth > data.idata.max_bandwidth)
data.idata.max_bandwidth = bandwidth;
if (bandwidth < data.idata.min_bandwidth)
iops = (double)(data.finished - previous_writes)
/ cycleSinceChange;
else
- iops = 0;
+ iops = -1;
- if (!std::isnan(iops)) {
+ if (!std::isnan(iops) && iops > -1) {
if (iops > data.idata.max_iops)
data.idata.max_iops = iops;
if (iops < data.idata.min_iops)
data.min_latency = 9999.0; // this better be higher than initial latency!
data.max_latency = 0;
data.avg_latency = 0;
- data.idata.min_bandwidth = 99999999.0;
- data.idata.max_bandwidth = 0;
data.object_contents = contentsChars;
lock.Unlock();
#include "common/config.h"
#include "common/Cond.h"
#include "common/ceph_context.h"
+#include <cfloat>
struct bench_interval_data {
- double min_bandwidth;
- double max_bandwidth;
- int min_iops;
- int max_iops;
+ double min_bandwidth = DBL_MAX;
+ double max_bandwidth = 0;
+ int min_iops = INT_MAX;
+ int max_iops = 0;
};
struct bench_history {