Skip to content

Commit

Permalink
stats: Add hint information to per priority level stats
Browse files Browse the repository at this point in the history
Modify the json and standard per-priority output stats to display the
hint value together with the priority class and level.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20230721110510.44772-7-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
damien-lemoal authored and axboe committed Jul 21, 2023
1 parent 79012fe commit 219a868
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,11 @@ static void show_ddir_status(struct group_run_stats *rs, struct thread_stat *ts,
continue;

snprintf(buf, sizeof(buf),
"%s prio %u/%u",
"%s prio %u/%u/%u",
clat_type,
ioprio_class(ts->clat_prio[ddir][i].ioprio),
ioprio(ts->clat_prio[ddir][i].ioprio));
ioprio(ts->clat_prio[ddir][i].ioprio),
ioprio_hint(ts->clat_prio[ddir][i].ioprio));
display_lat(buf, min, max, mean, dev, out);
}
}
Expand Down Expand Up @@ -640,10 +641,11 @@ static void show_ddir_status(struct group_run_stats *rs, struct thread_stat *ts,
continue;

snprintf(prio_name, sizeof(prio_name),
"%s prio %u/%u (%.2f%% of IOs)",
"%s prio %u/%u/%u (%.2f%% of IOs)",
clat_type,
ioprio_class(ts->clat_prio[ddir][i].ioprio),
ioprio(ts->clat_prio[ddir][i].ioprio),
ioprio_hint(ts->clat_prio[ddir][i].ioprio),
100. * (double) prio_samples / (double) samples);
show_clat_percentiles(ts->clat_prio[ddir][i].io_u_plat,
prio_samples, ts->percentile_list,
Expand Down Expand Up @@ -1533,6 +1535,8 @@ static void add_ddir_status_json(struct thread_stat *ts,
ioprio_class(ts->clat_prio[ddir][i].ioprio));
json_object_add_value_int(obj, "prio",
ioprio(ts->clat_prio[ddir][i].ioprio));
json_object_add_value_int(obj, "priohint",
ioprio_hint(ts->clat_prio[ddir][i].ioprio));

tmp_object = add_ddir_lat_json(ts,
ts->clat_percentiles | ts->lat_percentiles,
Expand Down

0 comments on commit 219a868

Please sign in to comment.