Project

stackviz

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
This gem is a thin wrapper of stackprof and provides simple API to see profiling result quickly.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
>= 0
~> 10.0

Runtime

~> 0.2.7
 Project Readme

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