}
}
+/*
+ ***************************************************************************
+ * Display I/O and transfer rate statistics in SVG.
+ *
+ * IN:
+ * @a Activity structure with statistics.
+ * @curr Index in array for current sample statistics.
+ * @action Action expected from current function.
+ * @svg_p SVG specific parameters: Current graph number (.@graph_no),
+ * flag indicating that a restart record has been previously
+ * found (.@restart) and a pointer on a record header structure
+ * (.@record_hdr) containing the first stats sample.
+ * @itv Interval of time in jiffies (only with F_MAIN action).
+ * @record_hdr Pointer on record header of current stats sample.
+ ***************************************************************************
+ */
+__print_funct_t svg_print_io_stats(struct activity *a, int curr, int action, struct svg_parm *svg_p,
+ unsigned long long itv, struct record_header *record_hdr)
+{
+ struct stats_io
+ *sic = (struct stats_io *) a->buf[curr],
+ *sip = (struct stats_io *) a->buf[!curr];
+ int group[] = {3, 2};
+ char *title[] = {"I/O and transfer rate statistics (1)", "I/O and transfer rate statistics (2)"};
+ char *g_title[] = {"tps", "rtps", "wtps",
+ "bread/s", "bwrtn/s"};
+ static double *spmin, *spmax;
+ static char **out;
+ static int *outsize;
+
+ if (action & F_BEGIN) {
+ /*
+ * Allocate arrays that will contain the graphs data
+ * and the min/max values.
+ */
+ out = allocate_graph_lines(5, &outsize, &spmin, &spmax);
+ }
+
+ if (action & F_MAIN) {
+ /* Check for min/max values */
+ save_extrema(0, 5, 0, (void *) a->buf[curr], (void *) a->buf[!curr],
+ itv, spmin, spmax);
+
+ /* tps */
+ lnappend(record_hdr->ust_time - svg_p->record_hdr->ust_time,
+ S_VALUE(sip->dk_drive, sic->dk_drive, itv),
+ out, outsize, svg_p->restart);
+ /* rtps */
+ lnappend(record_hdr->ust_time - svg_p->record_hdr->ust_time,
+ S_VALUE(sip->dk_drive_rio, sic->dk_drive_rio, itv),
+ out + 1, outsize + 1, svg_p->restart);
+ /* wtps */
+ lnappend(record_hdr->ust_time - svg_p->record_hdr->ust_time,
+ S_VALUE(sip->dk_drive_wio, sic->dk_drive_wio, itv),
+ out + 2, outsize + 2, svg_p->restart);
+ /* bread/s */
+ lnappend(record_hdr->ust_time - svg_p->record_hdr->ust_time,
+ S_VALUE(sip->dk_drive_rblk, sic->dk_drive_rblk, itv),
+ out + 3, outsize + 3, svg_p->restart);
+ /* bwrtn/s */
+ lnappend(record_hdr->ust_time - svg_p->record_hdr->ust_time,
+ S_VALUE(sip->dk_drive_wblk, sic->dk_drive_wblk, itv),
+ out + 4, outsize + 4, svg_p->restart);
+ }
+
+ if (action & F_END) {
+ draw_activity_graphs(a->g_nr, SVG_LINE_GRAPH, title, g_title, NULL, group,
+ spmin, spmax, out, outsize, svg_p, record_hdr);
+
+ /* Free remaining structures */
+ free_graphs(out, outsize, spmin, spmax);
+ }
+}
+
/*
***************************************************************************
* Display memory statistics in SVG.