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 <jens.axboe@oracle.com>
diff --git a/fio_generate_plots b/fio_generate_plots
index 4ae1d0a..9b1e1ca 100755
--- a/fio_generate_plots
+++ b/fio_generate_plots
@@ -20,11 +20,12 @@
 	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 @@
 	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 @@
 	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 63c0a33..082cfd4 100644
--- a/log.c
+++ b/log.c
@@ -484,6 +484,6 @@
 {
 	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);
 }