]> granicus.if.org Git - sysstat/commitdiff
SVG: Add SVG output for swap statistics - single in/out graph
authorSteve Kay <stevekay@gmail.com>
Thu, 10 Mar 2016 23:08:05 +0000 (15:08 -0800)
committerSteve Kay <stevekay@gmail.com>
Thu, 10 Mar 2016 23:08:05 +0000 (15:08 -0800)
activity.c
svg_stats.c

index be45429bf452cbf1f2de570e774b25608ee085de..25bd91e4f430f18462ceab9acb7539e2c4e9234b 100644 (file)
@@ -190,7 +190,7 @@ struct activity swap_act = {
        .f_svg_print    = svg_print_swap_stats,
        .hdr_line       = "pswpin/s;pswpout/s",
        .name           = "A_SWAP",
-       .g_nr           = 2,
+       .g_nr           = 1,
 #endif
        .nr             = 1,
        .nr2            = 1,
index 953b52e6ea3d5f59c7e71fcd14bc5d385d7f4ad3..20e2a4f0f4be273cd4713f25ed0002793f643a48 100644 (file)
@@ -605,8 +605,8 @@ __print_funct_t svg_print_swap_stats(struct activity *a, int curr, int action, s
        struct stats_swap
                *ssc = (struct stats_swap *) a->buf[curr],
                *ssp = (struct stats_swap *) a->buf[!curr];
-       int group[] = {1, 1};
-       char *title[] = {"Swap activity (1)", "Swap activity (2)"};
+       int group[] = {2};
+       char *title[] = {"Swap activity"};
        char *g_title[] = {"pswpin/s", "pswpout/s" };
        static double *spmin, *spmax;
        static char **out;
@@ -617,12 +617,12 @@ __print_funct_t svg_print_swap_stats(struct activity *a, int curr, int action, s
                 * Allocate arrays that will contain the graphs data
                 * and the min/max values.
                 */
-               out = allocate_graph_lines(8, &outsize, &spmin, &spmax);
+               out = allocate_graph_lines(2, &outsize, &spmin, &spmax);
        }
 
        if (action & F_MAIN) {
                /* Check for min/max values */
-               save_extrema(0, 8, 0, (void *) a->buf[curr], (void *) a->buf[!curr],
+               save_extrema(0, 2, 0, (void *) a->buf[curr], (void *) a->buf[!curr],
                             itv, spmin, spmax);
                /* pswpin/s */
                lnappend(record_hdr->ust_time - svg_p->record_hdr->ust_time,