Profiling setup for the DOM parser.
This commit is contained in:
parent
2c4890533c
commit
d5e59c38ac
|
@ -9,4 +9,4 @@ lib/oga/xml/parser.rb
|
||||||
benchmark/fixtures/big.xml
|
benchmark/fixtures/big.xml
|
||||||
|
|
||||||
profile/samples/*.txt
|
profile/samples/*.txt
|
||||||
profile/samples/lexer/*.txt
|
profile/samples/*/*.txt
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
require_relative '../profile_helper'
|
||||||
|
|
||||||
|
xml = read_big_xml
|
||||||
|
parser = Oga::XML::Parser.new(xml)
|
||||||
|
|
||||||
|
profile_memory('parser/big_xml')
|
||||||
|
|
||||||
|
parser.parse
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env gnuplot
|
||||||
|
|
||||||
|
set title "DOM parsing 10MB of XML"
|
||||||
|
|
||||||
|
set xlabel "Sample"
|
||||||
|
set ylabel "Memory (MB)"
|
||||||
|
|
||||||
|
set yrange [0:*]
|
||||||
|
|
||||||
|
set term qt persist size 900,600
|
||||||
|
set grid
|
||||||
|
|
||||||
|
set style line 1 lc rgb "#0060ad" lt 1 lw 2 pt 7 ps 1
|
||||||
|
|
||||||
|
plot "profile/samples/parser/big_xml.txt" \
|
||||||
|
using 0:($1 / 1024 ** 2) \
|
||||||
|
with linespoints ls 1 \
|
||||||
|
title "Memory"
|
||||||
|
|
||||||
|
# vim: set ft=gnuplot:
|
Loading…
Reference in New Issue