From 513d3f997fb0598016e86cbbc17b215f394e25d4 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 5 Dec 2021 20:57:02 +0100 Subject: [PATCH] memleak: Make size configurable. --- memleak/memory-consumption-over-time.gp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/memleak/memory-consumption-over-time.gp b/memleak/memory-consumption-over-time.gp index 2643a22..2aa8f8b 100755 --- a/memleak/memory-consumption-over-time.gp +++ b/memleak/memory-consumption-over-time.gp @@ -24,6 +24,10 @@ mystarttime = strptime(mytimefmt, "1970-01-01T00:00") if (ARGC >= 2) { mystarttime = strptime(mytimefmt, ARG2) } + +array mysize[2] = [ 1200, 900 ] +if (ARGC >= 4) { + array mysize[2] = [ ARG3, ARG4 ] } set title sprintf('%s memory consumption over time', myprog) @@ -47,13 +51,14 @@ set grid xtics ytics mxtics mytics lc "gray50" lw 0.75, lc "gray" lw 0.5 myfont = "Source Sans Pro,12" -# set terminal qt enhanced size 1200,900 font myfont +# set terminal qt enhanced size mysize[1],mysize[2] font myfont -# set terminal png enhanced notransparent size 1200,900 font myfont +# set terminal png enhanced notransparent size mysize[1],mysize[2] font myfont # set output sprintf("%s memory consumption over time.png", myprog) myfont = "Source Sans Pro,16" -set terminal svg enhanced background rgb 'white' size 1200,900 dynamic font myfont +set terminal svg enhanced background rgb 'white' size mysize[1],mysize[2] \ + dynamic font myfont set output sprintf("%s memory consumption over time.svg", myprog) plot infile every 4::0 using ((timecolumn(2) - mystarttime)):($3/1024) title 'USS' \