Skip to content

Instantly share code, notes, and snippets.

@gja
Created June 26, 2014 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gja/92a5c6533ec7c2315827 to your computer and use it in GitHub Desktop.
Save gja/92a5c6533ec7c2315827 to your computer and use it in GitHub Desktop.
Plot a Yourkit Memory Heap CSV
#! /usr/bin/env gnuplot
set terminal png size 1024,768 font "/Library/Fonts/Arial.ttf" 12
set output "output.png"
set style line 1 lt 1 lw 2 pt 7 pi -1 ps 1.5
set pointintervalbox 3
set datafile separator ','
set xrange [*:*]
set title "Heap Memory"
set key at screen .35, 0.75
set yrange [0:*]
plot \
"heap.csv" using 1:2 every ::1 smooth unique title "Allocated Pools", \
"heap.csv" using 1:($3 + $4 + $5) every ::1 smooth unique title "Used Par Survivor" with filledcurves y1=0 linecolor rgb "blue", \
"heap.csv" using 1:($4 + $5) every ::1 smooth unique title "Used Par Eden" with filledcurves y1=0 linecolor rgb "green", \
"heap.csv" using 1:5 every ::1 smooth unique title "CMS Old Gen" with filledcurves y1=0 linecolor rgb "orange"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment