diff --git a/profile/plot/pull_parser/big_xml.gnuplot b/profile/plot/pull_parser/big_xml.gnuplot new file mode 100755 index 0000000..c8b7df3 --- /dev/null +++ b/profile/plot/pull_parser/big_xml.gnuplot @@ -0,0 +1,20 @@ +#!/usr/bin/env gnuplot + +set title "Pull 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/pull_parser/big_xml.txt" \ + using 0:($1 / 1024 ** 2) \ + with linespoints ls 1 \ + title "Memory" + +# vim: set ft=gnuplot: diff --git a/profile/pull_parser/big_xml.rb b/profile/pull_parser/big_xml.rb new file mode 100644 index 0000000..716498c --- /dev/null +++ b/profile/pull_parser/big_xml.rb @@ -0,0 +1,8 @@ +require_relative '../profile_helper' + +xml = read_big_xml +parser = Oga::XML::PullParser.new(xml) + +profile_memory('pull_parser/big_xml') + +parser.parse { |node| } diff --git a/profile/samples/pull_parser/.gitkeep b/profile/samples/pull_parser/.gitkeep new file mode 100644 index 0000000..e69de29