Add script/rubyprof to generate cachegrind callgraphs #3692

Merged
merged 1 commit into from May 10, 2015

Conversation

Projects
None yet
3 participants
@fw42
Contributor

fw42 commented May 10, 2015

Inspired by script/stackprof, this adds a script to generate ruby-prof profiles in KCachegrind calltree format (can be opened using qcachegrind under Mac OS X).

Output looks something like this:

screen shot 2015-05-09 at 10 32 43 pm

Thoughts @parkr?

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr May 10, 2015

Member

This is super cool.

Member

parkr commented May 10, 2015

This is super cool.

@parkr

View changes

script/rubyprof
+#!/usr/bin/ruby
+
+require 'ruby-prof'
+require 'jekyll'

This comment has been minimized.

@parkr

parkr May 10, 2015

Member

can we lock to bundle exec here?

@parkr

parkr May 10, 2015

Member

can we lock to bundle exec here?

@parkr

View changes

script/rubyprof
+at_exit do
+ result = RubyProf.stop
+ printer = RubyProf::CallTreePrinter.new(result)
+ filename = "/tmp/ruby_prof_#{rand 10000}"

This comment has been minimized.

@parkr

parkr May 10, 2015

Member

can we write to local tmp directory? this would vomit on windows :(

@parkr

parkr May 10, 2015

Member

can we write to local tmp directory? this would vomit on windows :(

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 May 10, 2015

Contributor

Updated. It's closer to stackprof now. btw I think stackprof can generate those files too. Not sure how exactly the output differs.

Contributor

fw42 commented May 10, 2015

Updated. It's closer to stackprof now. btw I think stackprof can generate those files too. Not sure how exactly the output differs.

parkr added a commit that referenced this pull request May 10, 2015

@parkr parkr merged commit 9c5c9d8 into jekyll:master May 10, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

parkr added a commit that referenced this pull request May 10, 2015

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.