Lines Matching refs:plot
659 static void plot_movie_history(struct plot *plot, struct list_head *list) in plot_movie_history() argument
671 svg_io_graph_movie_array_spindle(plot, in plot_movie_history()
674 svg_io_graph_movie_array(plot, in plot_movie_history()
680 svg_io_graph_movie_array_spindle(plot, in plot_movie_history()
683 svg_io_graph_movie_array(plot, in plot_movie_history()
719 static void plot_io_legend(struct plot *plot, struct graph_dot_data *gdd, char *prefix, char *rw) in plot_io_legend() argument
731 svg_add_legend(plot, label, rw, gdd->color); in plot_io_legend()
735 static void plot_io(struct plot *plot, unsigned int min_seconds, in plot_io() argument
744 setup_axis(plot); in plot_io()
746 svg_alloc_legend(plot, count_io_plot_types() * 2); in plot_io()
748 set_plot_label(plot, "Device IO"); in plot_io()
749 set_ylabel(plot, "Offset (MB)"); in plot_io()
750 set_yticks(plot, num_yticks, min_offset / (1024 * 1024), in plot_io()
752 set_xticks(plot, num_xticks, min_seconds, max_seconds); in plot_io()
759 svg_io_graph(plot, tf->gdd_writes[i]); in plot_io()
760 plot_io_legend(plot, tf->gdd_writes[i], prefix, " Writes"); in plot_io()
763 svg_io_graph(plot, tf->gdd_reads[i]); in plot_io()
764 plot_io_legend(plot, tf->gdd_reads[i], prefix, " Reads"); in plot_io()
768 if (plot->add_xlabel) in plot_io()
769 set_xlabel(plot, "Time (seconds)"); in plot_io()
770 svg_write_legend(plot); in plot_io()
771 close_plot(plot); in plot_io()
774 static void plot_tput(struct plot *plot, unsigned int min_seconds, in plot_tput() argument
786 svg_alloc_legend(plot, num_traces * 2); in plot_tput()
803 setup_axis(plot); in plot_tput()
804 set_plot_label(plot, "Throughput"); in plot_tput()
810 set_ylabel(plot, line); in plot_tput()
811 set_yticks(plot, num_yticks, 0, max, ""); in plot_tput()
812 set_xticks(plot, num_xticks, min_seconds, max_seconds); in plot_tput()
816 svg_line_graph(plot, tf->tput_writes_gld, tf->writes_color, 0, 0); in plot_tput()
818 svg_add_legend(plot, tf->label, " Writes", tf->writes_color); in plot_tput()
821 svg_line_graph(plot, tf->tput_reads_gld, tf->reads_color, 0, 0); in plot_tput()
823 svg_add_legend(plot, tf->label, " Reads", tf->reads_color); in plot_tput()
827 if (plot->add_xlabel) in plot_tput()
828 set_xlabel(plot, "Time (seconds)"); in plot_tput()
831 svg_write_legend(plot); in plot_tput()
833 close_plot(plot); in plot_tput()
837 static void plot_fio_tput(struct plot *plot, in plot_fio_tput() argument
849 svg_alloc_legend(plot, num_fio_traces); in plot_fio_tput()
862 setup_axis(plot); in plot_fio_tput()
863 set_plot_label(plot, "Fio Throughput"); in plot_fio_tput()
869 set_ylabel(plot, line); in plot_fio_tput()
870 set_yticks(plot, num_yticks, 0, max, ""); in plot_fio_tput()
872 set_xticks(plot, num_xticks, min_seconds, max_seconds); in plot_fio_tput()
875 svg_line_graph(plot, tf->fio_gld, tf->line_color, 0, 0); in plot_fio_tput()
877 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_fio_tput()
881 if (plot->add_xlabel) in plot_fio_tput()
882 set_xlabel(plot, "Time (seconds)"); in plot_fio_tput()
885 svg_write_legend(plot); in plot_fio_tput()
886 close_plot(plot); in plot_fio_tput()
890 static void plot_cpu(struct plot *plot, unsigned int max_seconds, char *label, in plot_cpu() argument
918 svg_alloc_legend(plot, num_traces * max); in plot_cpu()
920 setup_axis(plot); in plot_cpu()
921 set_plot_label(plot, label); in plot_cpu()
925 set_yticks(plot, num_yticks, 0, tf->mpstat_gld[gld_index]->max, ""); in plot_cpu()
926 set_ylabel(plot, "Percent"); in plot_cpu()
927 set_xticks(plot, num_xticks, tf->mpstat_min_seconds, max_seconds); in plot_cpu()
943 svg_line_graph(plot, tf->mpstat_gld[0], color, 0, 0); in plot_cpu()
944 svg_add_legend(plot, tf->label, " avg", color); in plot_cpu()
971 svg_line_graph(plot, gld, color, avg + 30, 95); in plot_cpu()
973 svg_add_legend(plot, tf->label, line, color); in plot_cpu()
982 if (plot->add_xlabel) in plot_cpu()
983 set_xlabel(plot, "Time (seconds)"); in plot_cpu()
985 if (!plot->no_legend) { in plot_cpu()
986 svg_write_legend(plot); in plot_cpu()
987 svg_free_legend(plot); in plot_cpu()
989 close_plot(plot); in plot_cpu()
993 static void plot_queue_depth(struct plot *plot, unsigned int min_seconds, in plot_queue_depth() argument
1002 setup_axis(plot); in plot_queue_depth()
1003 set_plot_label(plot, "Queue Depth"); in plot_queue_depth()
1005 svg_alloc_legend(plot, num_traces); in plot_queue_depth()
1016 set_ylabel(plot, "Pending IO"); in plot_queue_depth()
1017 set_yticks(plot, num_yticks, 0, max, ""); in plot_queue_depth()
1018 set_xticks(plot, num_xticks, min_seconds, max_seconds); in plot_queue_depth()
1021 svg_line_graph(plot, tf->queue_depth_gld, tf->line_color, 0, 0); in plot_queue_depth()
1023 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_queue_depth()
1026 if (plot->add_xlabel) in plot_queue_depth()
1027 set_xlabel(plot, "Time (seconds)"); in plot_queue_depth()
1029 svg_write_legend(plot); in plot_queue_depth()
1030 close_plot(plot); in plot_queue_depth()
1094 static void plot_io_movie(struct plot *plot) in plot_io_movie() argument
1126 set_plot_output(plot, line); in plot_io_movie()
1127 set_plot_title(plot, graph_title); in plot_io_movie()
1128 orig_y_offset = plot->start_y_offset; in plot_io_movie()
1130 plot->no_legend = 1; in plot_io_movie()
1133 plot->timeline = i / graph_width_factor; in plot_io_movie()
1135 plot_tput(plot, tf->min_seconds, tf->max_seconds, 0); in plot_io_movie()
1137 plot_cpu(plot, tf->max_seconds, in plot_io_movie()
1140 plot->direction = PLOT_ACROSS; in plot_io_movie()
1141 plot_queue_depth(plot, tf->min_seconds, tf->max_seconds); in plot_io_movie()
1144 plot->start_y_offset = orig_y_offset; in plot_io_movie()
1146 plot->no_legend = 0; in plot_io_movie()
1147 plot->timeline = 0; in plot_io_movie()
1148 plot->direction = PLOT_DOWN;; in plot_io_movie()
1151 setup_axis_spindle(plot); in plot_io_movie()
1153 setup_axis(plot); in plot_io_movie()
1155 svg_alloc_legend(plot, count_io_plot_types() * 2); in plot_io_movie()
1162 plot_io_legend(plot, tf->gdd_reads[pid], prefix, " Reads"); in plot_io_movie()
1164 plot_io_legend(plot, tf->gdd_writes[pid], prefix, " Writes"); in plot_io_movie()
1187 plot_movie_history(plot, &movie_history); in plot_io_movie()
1189 svg_write_legend(plot); in plot_io_movie()
1190 close_plot(plot); in plot_io_movie()
1191 close_plot(plot); in plot_io_movie()
1193 close_plot_file(plot); in plot_io_movie()
1202 static void plot_latency(struct plot *plot, unsigned int min_seconds, in plot_latency() argument
1214 svg_alloc_legend(plot, num_traces); in plot_latency()
1225 setup_axis(plot); in plot_latency()
1226 set_plot_label(plot, "IO Latency"); in plot_latency()
1232 set_ylabel(plot, line); in plot_latency()
1233 set_yticks(plot, num_yticks, 0, max, ""); in plot_latency()
1234 set_xticks(plot, num_xticks, min_seconds, max_seconds); in plot_latency()
1237 svg_line_graph(plot, tf->latency_gld, tf->line_color, 0, 0); in plot_latency()
1239 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_latency()
1242 if (plot->add_xlabel) in plot_latency()
1243 set_xlabel(plot, "Time (seconds)"); in plot_latency()
1245 svg_write_legend(plot); in plot_latency()
1246 close_plot(plot); in plot_latency()
1250 static void plot_iops(struct plot *plot, unsigned int min_seconds, in plot_iops() argument
1269 setup_axis(plot); in plot_iops()
1270 set_plot_label(plot, "IOPs"); in plot_iops()
1272 svg_alloc_legend(plot, num_traces); in plot_iops()
1277 set_ylabel(plot, "IO/s"); in plot_iops()
1279 set_yticks(plot, num_yticks, 0, max, units); in plot_iops()
1280 set_xticks(plot, num_xticks, min_seconds, max_seconds); in plot_iops()
1283 svg_line_graph(plot, tf->iop_gld, tf->line_color, 0, 0); in plot_iops()
1285 svg_add_legend(plot, tf->label, "", tf->line_color); in plot_iops()
1288 if (plot->add_xlabel) in plot_iops()
1289 set_xlabel(plot, "Time (seconds)"); in plot_iops()
1291 svg_write_legend(plot); in plot_iops()
1293 close_plot(plot); in plot_iops()
1297 static void check_plot_columns(struct plot *plot, int index) in check_plot_columns() argument
1304 if (plot->direction == PLOT_DOWN) { in check_plot_columns()
1305 plot->start_x_offset = 0; in check_plot_columns()
1307 plot->add_xlabel = 1; in check_plot_columns()
1309 plot->direction = PLOT_ACROSS; in check_plot_columns()
1312 plot->direction = PLOT_DOWN; in check_plot_columns()
1314 plot->add_xlabel = 1; in check_plot_columns()
1593 struct plot *plot; in main() local
1693 plot = alloc_plot(); in main()
1697 plot_io_movie(plot); in main()
1701 set_plot_output(plot, output_filename); in main()
1712 plot->add_xlabel = 1; in main()
1713 set_plot_title(plot, graph_title); in main()
1715 check_plot_columns(plot, IO_GRAPH_INDEX); in main()
1716 plot_io(plot, min_seconds, max_seconds, min_offset, max_offset); in main()
1717 plot->add_xlabel = 0; in main()
1728 check_plot_columns(plot, TPUT_GRAPH_INDEX); in main()
1729 plot_tput(plot, min_seconds, max_seconds, 1); in main()
1731 check_plot_columns(plot, FIO_GRAPH_INDEX); in main()
1732 plot_fio_tput(plot, min_seconds, max_seconds); in main()
1734 check_plot_columns(plot, CPU_IO_GRAPH_INDEX); in main()
1735 plot_cpu(plot, max_seconds, "CPU IO Wait Time", in main()
1738 check_plot_columns(plot, CPU_SYS_GRAPH_INDEX); in main()
1739 plot_cpu(plot, max_seconds, "CPU System Time", in main()
1742 check_plot_columns(plot, CPU_IRQ_GRAPH_INDEX); in main()
1743 plot_cpu(plot, max_seconds, "CPU IRQ Time", in main()
1746 check_plot_columns(plot, CPU_SOFT_GRAPH_INDEX); in main()
1747 plot_cpu(plot, max_seconds, "CPU SoftIRQ Time", in main()
1750 check_plot_columns(plot, CPU_USER_GRAPH_INDEX); in main()
1751 plot_cpu(plot, max_seconds, "CPU User Time", in main()
1754 check_plot_columns(plot, LATENCY_GRAPH_INDEX); in main()
1755 plot_latency(plot, min_seconds, max_seconds); in main()
1757 check_plot_columns(plot, QUEUE_DEPTH_GRAPH_INDEX); in main()
1758 plot_queue_depth(plot, min_seconds, max_seconds); in main()
1760 check_plot_columns(plot, IOPS_GRAPH_INDEX); in main()
1761 plot_iops(plot, min_seconds, max_seconds); in main()
1764 close_plot(plot); in main()
1765 close_plot_file(plot); in main()