Comments (8)
Stacktrace?
from stackprof.
Here you are:
$ stackprof tmp/stackprof-wall-5031-1389574951.dump --limit=6
==================================
Mode: wall(1000)
Samples: 23758 (0.94% miss rate)
GC: 3610 (15.19%)
==================================
(...)
$ stackprof tmp/stackprof-wall-5031-1389574951.dump --limit 6
/home/vagrant/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/stackprof-0.2.2/bin/stackprof:30:in `binread': No such file or directory @ rb_sysopen - 6 (Errno::ENOENT)
from /home/vagrant/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/stackprof-0.2.2/bin/stackprof:30:in `<top (required)>'
from /home/vagrant/.rbenv/versions/2.1.0/bin/stackprof:23:in `load'
from /home/vagrant/.rbenv/versions/2.1.0/bin/stackprof:23:in `<main>'
from stackprof.
Very strange, I don't see this behavior in my environment.. AFAIK, optparse is supposed to handle both forms.
from stackprof.
In fact, I think the =
sign is required because it's not inside the square brackets:
o.on('--limit=[num]', ... )
o.on('--method=[grep]', ... )
o.on('--file=[grep]', ... )
This version works for me:
o.on('--text', 'Text summary per method (default)'){ options[:format] = :text }
o.on('--files', 'List of files'){ |f| options[:format] = :files }
o.on('--limit [=num]', Integer, 'Limit --text or --files output to N lines'){ |n| options[:limit] = n }
o.on('--sort-total', "Sort --text or --files output on total samples\n\n"){ options[:sort] = true }
o.on('--method [=grep]', 'Zoom into specified method'){ |f| options[:format] = :method; options[:filter] = f }
o.on('--file [=grep]', 'Show annotated code for specified file'){ |f| options[:format] = :file; options[:filter] = f }
o.on('--callgrind', 'Callgrind output (use with kcachegrind, gprof2dot)'){ options[:format] = :callgrind }
o.on('--graphviz', "Graphviz output (use with dot)\n\n"){ options[:format] = :graphviz }
o.on('--debug', 'Pretty print raw profile data'){ options[:format] = :debug }
@juanxo could you test it?
from stackprof.
yep, I can confirm this too 👍
Note that the blank between the switch name and the [=val]
is necessary
from stackprof.
@tmm1: what are your thoughts?
Should I make a PR?
from stackprof.
Did this break in 26a7259?
Please open a PR, I'll merge.
from stackprof.
Indeed, You broke it in 26a7259.
It doesn't need the =
sign at all.
from stackprof.
Related Issues (20)
- Problem with Ruby 2.7.6 and version 0.2.20 HOT 6
- Error installing with Ruby 3.1 HOT 3
- Segmentation fault on Ruby 2.7.6p219 HOT 4
- Possibility to filter certain files or classes?
- flaky test failure with ruby3.1
- Test failures on 32bit arch
- Flamegraph way too short in `wall` mode HOT 5
- Support Gecko format? HOT 2
- Weird timestamp deltas with puma HOT 2
- bug: "missed_samples" integer overflow possible HOT 1
- bug: possible state leak of `buffer_count` state between stackprof invocations HOT 2
- C99 error while compiling v0.2.25 HOT 1
- Add marker metadata feature HOT 1
- stackprof fails to build native extensions on ubuntu 22.04 and ruby 3.2.2 HOT 1
- "lines" attribute format?
- bug: state of _stackprof.last_sample_at can leak between invocations
- 3.3.0-dev: Segfault in `rb_profile_frames` with N:M threads enabled HOT 3
- Add discussions tab, hide the projects tab
- ruby 3.2.2 An error occurred while installing stackprof (0.2.26), and Bundler cannot
- Test failure StackProfTest#test_raw Expected 0 to be > 0.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stackprof.