Basic memory profiling setup.

This makes it a bit easier to profile memory usage of certain components and
plot them using Gnuplot. In the past I would write one-off scripts for this and
throw them away, only to figure out I needed them again later on.

Profiling samples are written to profile/samples and can be plotted using
corresponding Gnuplot scripts found in profile/plot. The latter requires
Gnuplot to be installed.
This commit is contained in:
Yorick Peterse committed 2014-04-29 13:38:56 +02:00
1 parent 70fcc8534c
commit 53c45c621b
6 files changed
+72

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env gnuplot
set title "Lexing 10MB of XML"
set xlabel "Sample"
set ylabel "Memory (MB)"
set yrange [0:*]
set term qt persist
set grid
set style line 1 lc rgb "#0060ad" lt 1 lw 2 pt 7 ps 1
plot "profile/samples/lexer/big_xml.txt" \
using 0:($1 / 1024 ** 2) \
with linespoints ls 1 \
title "Memory"
# vim: set ft=gnuplot: