*/
static unsigned long long plat_idx_to_val(unsigned int idx)
{
- unsigned int error_bits, k, base;
+ unsigned int error_bits;
+ unsigned long long k, base;
assert(idx < FIO_IO_U_PLAT_NR);
/* Find the group and compute the minimum value of that group */
error_bits = (idx >> FIO_IO_U_PLAT_BITS) - 1;
- base = 1 << (error_bits + FIO_IO_U_PLAT_BITS);
+ base = ((unsigned long long) 1) << (error_bits + FIO_IO_U_PLAT_BITS);
/* Find its bucket number of the group */
k = idx % FIO_IO_U_PLAT_VAL;
else
bw_str = "kB";
+ if (rs->agg[ddir]) {
+ p_of_agg = mean * 100 / (double) (rs->agg[ddir] / 1024);
+ if (p_of_agg > 100.0)
+ p_of_agg = 100.0;
+ }
+
if (rs->unit_base == 1) {
min *= 8.0;
max *= 8.0;
dev *= 8.0;
}
- if (rs->agg[ddir]) {
- p_of_agg = mean * 100 / (double) (rs->agg[ddir] / 1024);
- if (p_of_agg > 100.0)
- p_of_agg = 100.0;
- }
-
if (mean > fkb_base * fkb_base) {
min /= fkb_base;
max /= fkb_base;
if (new_line) {
if (line)
log_buf(out, "\n");
- log_buf(out, " lat (%s) : ", msg);
+ log_buf(out, " lat (%s) : ", msg);
new_line = 0;
line = 0;
}
double p_of_agg = 100.0;
if (rs->agg[ddir]) {
- p_of_agg = mean * 100 / (double) rs->agg[ddir];
+ p_of_agg = mean * 100 / (double) (rs->agg[ddir] / 1024);
if (p_of_agg > 100.0)
p_of_agg = 100.0;
}
if (calc_lat(&ts->bw_stat[ddir], &min, &max, &mean, &dev)) {
if (rs->agg[ddir]) {
- p_of_agg = mean * 100 / (double) rs->agg[ddir];
+ p_of_agg = mean * 100 / (double) (rs->agg[ddir] / 1024);
if (p_of_agg > 100.0)
p_of_agg = 100.0;
}