Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flamegraph option is error. #33

Closed
SpringMT opened this issue Sep 21, 2014 · 4 comments
Closed

Flamegraph option is error. #33

SpringMT opened this issue Sep 21, 2014 · 4 comments

Comments

@SpringMT
Copy link
Contributor

I try to use stackprof.
I can show text summary of stackprof results, however not show flamegraph(using --flamegraph option) occuring errors.

Errors is below.

% bundle exec stackprof tmp/stackprof-cpu-sample.dump --flamegraph
/Users/foo/bar/vendor/bundle/ruby/2.1.0/gems/stackprof-0.2.7/lib/stackprof/report.rb:83:in `print_flamegraph': profile does not include raw samples (RuntimeError)
    from /Users/foo/bar/vendor/bundle/ruby/2.1.0/gems/stackprof-0.2.7/bin/stackprof:60:in `<top (required)>'
    from /Users/foo/bar/vendor/bundle/ruby/2.1.0/bin/stackprof:23:in `load'
    from /Users/foo/bar/vendor/bundle/ruby/2.1.0/bin/stackprof:23:in `<main>'

Text summary is below(success).

% bundle exec stackprof tmp/stackprof-cpu-sample.dump --limit 1
==================================
  Mode: cpu(1000)
  Samples: 2136 (0.05% miss rate)
  GC: 229 (10.72%)
==================================
     TOTAL    (pct)     SAMPLES    (pct)     FRAME
       691  (32.4%)         691  (32.4%)     #<Module:0x007fbfd1951828>.mechanism
@tmm1
Copy link
Owner

tmm1 commented Sep 21, 2014

Flamegraphs require more data to draw so you must run StackProf.start(raw: true). I forgot to document this in the readme.

@SpringMT
Copy link
Contributor Author

Thx!
I can see a FlameGraph!
Great!

@SpringMT
Copy link
Contributor Author

Only for Japanese, I wrote the blog for stackprof.
http://spring-mt.hatenablog.com/entry/2014/09/21/014930

@sonots
Copy link

sonots commented Sep 21, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants