From 9088558eee5950faadc5c611c28287b6767dc60f Mon Sep 17 00:00:00 2001 From: Steve Kay Date: Thu, 10 Mar 2016 15:08:05 -0800 Subject: [PATCH] SVG: Add SVG output for swap statistics - single in/out graph --- activity.c | 2 +- svg_stats.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/activity.c b/activity.c index be45429..25bd91e 100644 --- a/activity.c +++ b/activity.c @@ -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, diff --git a/svg_stats.c b/svg_stats.c index 953b52e..20e2a4f 100644 --- a/svg_stats.c +++ b/svg_stats.c @@ -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, -- 2.40.0