memleak: Allow to change ytic values.
This commit is contained in:
parent
d601e334c9
commit
3ce6d53524
@ -4,7 +4,11 @@
|
||||
# | awk '{print "USS:", $4; print "PSS:",$5; print "RSS:",$6; print "SWP:",$3;}' \
|
||||
# | sed "s/:/ $(date --iso-8601=minutes)/" >> mem-myprogram.data
|
||||
#
|
||||
# Arguments: <program name> <time of first data point> [width] [height]
|
||||
# Arguments: <program name> <time of first data point> [ytic mode] [width] [height]
|
||||
# Argument 3 (ytic mode) means:
|
||||
# - default: 1 tic every 10 MiB, 1 mtic every 5 MiB.
|
||||
# - big: 1 tic every 100 MiB, 1 mtic every 10 MiB.
|
||||
# - verybig: 1 tic every 1000 MiB, 1 mtic every 100 MiB.
|
||||
# Example usage: ./memory-consumption-over-time.gp myprogram 2021-12-05T08:42
|
||||
|
||||
if (ARGC < 2) {
|
||||
@ -25,9 +29,21 @@ if (ARGC >= 2) {
|
||||
mystarttime = strptime(mytimefmt, ARG2)
|
||||
}
|
||||
|
||||
myytics = 10 # 1 tic every 10 MiB.
|
||||
mymytics = 2 # 1 mtic every 5 MiB.
|
||||
if (ARGC >= 3) {
|
||||
if (ARG3 eq "big") {
|
||||
myytics = 100 # 1 tic every 100 MiB.
|
||||
mymytics = 10 # 1 mtic every 10 MiB.
|
||||
}
|
||||
if (ARG3 eq "verybig") {
|
||||
myytics = 1000 # 1 tic every 1000 MiB.
|
||||
mymytics = 10 # 1 mtic every 10 MiB.
|
||||
}}
|
||||
|
||||
array mysize[2] = [ 1200, 900 ]
|
||||
if (ARGC >= 4) {
|
||||
array mysize[2] = [ ARG3, ARG4 ]
|
||||
if (ARGC >= 5) {
|
||||
array mysize[2] = [ ARG4, ARG5 ]
|
||||
}
|
||||
|
||||
set title sprintf('%s memory consumption over time', myprog)
|
||||
@ -43,10 +59,10 @@ set xtics format "%tH"
|
||||
|
||||
set xtics 21600 # 1 tic every 6 hours.
|
||||
set mxtics 6 # 1 mtic every hour.
|
||||
set ytics 10 nomirror # 1 tic every 10 MiB.
|
||||
set mytics 2 # 1 mtic every 5 MiB.
|
||||
set y2tics 10 nomirror textcolor 'dark-red'
|
||||
set my2tics 2
|
||||
set ytics myytics nomirror
|
||||
set mytics mymytics
|
||||
set y2tics myytics nomirror textcolor 'dark-red'
|
||||
set my2tics mymytics
|
||||
set grid xtics ytics mxtics mytics lc "gray50" lw 0.75, lc "gray" lw 0.5
|
||||
|
||||
myfont = "Source Sans Pro,12"
|
||||
|
Loading…
x
Reference in New Issue
Block a user