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:
1 parent
70fcc8534c
commit
53c45c621b
6 files changed
+72
No files matched your search
Executable
+20
@@ -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:
|
||||
Reference in new issue
Block a user