From: Jens Axboe Date: Fri, 4 Apr 2008 21:15:19 +0000 (+0200) Subject: Improve naming in fio gnuplot graphs X-Git-Tag: fio-1.20-rc4~8 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=84f83179602f4a27e7a63beb84d05983c415f2ff Improve naming in fio gnuplot graphs Use job name and strip the known postfix of files out of the title. Signed-off-by: Jens Axboe --- diff --git a/fio_generate_plots b/fio_generate_plots index 4ae1d0af..9b1e1ca5 100755 --- a/fio_generate_plots +++ b/fio_generate_plots @@ -20,11 +20,12 @@ for i in *bw.log; do if [ ! -r $i ]; then continue fi + PT=$(echo $i | sed s/_bw.log//g) if [ "$PLOT_LINE"x != "x" ]; then PLOT_LINE=$PLOT_LINE", " fi - PLOT_LINE=$PLOT_LINE"'$i' with lines" + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" done if [ "$PLOT_LINE"x != "x" ]; then @@ -37,11 +38,12 @@ for i in *slat.log; do if [ ! -r $i ]; then continue fi + PT=$(echo $i | sed s/_slat.log//g) if [ "$PLOT_LINE"x != "x" ]; then PLOT_LINE=$PLOT_LINE", " fi - PLOT_LINE=$PLOT_LINE"'$i' with lines" + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" done if [ "$PLOT_LINE"x != "x" ]; then @@ -54,11 +56,12 @@ for i in *clat.log; do if [ ! -r $i ]; then continue fi + PT=$(echo $i | sed s/_clat.log//g) if [ "$PLOT_LINE"x != "x" ]; then PLOT_LINE=$PLOT_LINE", " fi - PLOT_LINE=$PLOT_LINE"'$i' with lines" + PLOT_LINE=$PLOT_LINE"'$i' title '$PT' with lines" done if [ "$PLOT_LINE"x != "x" ]; then diff --git a/log.c b/log.c index 63c0a332..082cfd41 100644 --- a/log.c +++ b/log.c @@ -484,6 +484,6 @@ void finish_log(struct thread_data *td, struct io_log *log, const char *name) { char file_name[256]; - snprintf(file_name, 200, "client%d_%s.log", td->thread_number, name); + snprintf(file_name, 200, "%s_%s.log", td->o.name, name); __finish_log(log, file_name); }