Stackviz
Quickly open graph image generated by stackprof.
This gem is a thin wrapper of stackprof and provides simple API to see profiling result quickly.
Installation
$ brew install graphviz
$ gem install stackviz
Usage
require 'stackviz'
Stackviz.profile do
1000.times { User.all.to_a }
end
Stackviz converts profiling result to image by graphviz
, saves it to /tmp
directory and open
it.
Specify path to save graph
Stackviz.profile(path: 'graph.gif') do
1000.times { User.all.to_a }
end
Do not open graph automatically
Stackviz.profile(open: false) do
1000.times { User.all.to_a }
end
License
MIT License