ts->clat_stat[ddir].samples,
ts->percentile_list, &ovals, &maxv,
&minv);
+ if (len > FIO_IO_U_LIST_MAX_LEN)
+ len = FIO_IO_U_LIST_MAX_LEN;
} else
len = 0;
percentile_object = json_create_object();
json_object_add_value_object(tmp_object, "percentile", percentile_object);
- for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++) {
- if (i >= len) {
- json_object_add_value_int(percentile_object, "0.00", 0);
- continue;
- }
+ for (i = 0; i < len; i++) {
snprintf(buf, sizeof(buf), "%f", ts->percentile_list[i].u.f);
json_object_add_value_int(percentile_object, (const char *)buf, ovals[i]);
}
dst->kb_base = src->kb_base;
if (!dst->unit_base)
dst->unit_base = src->unit_base;
+ if (!dst->sig_figs)
+ dst->sig_figs = src->sig_figs;
}
void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src,