danlucraft / jruby-prof Goto Github PK
View Code? Open in Web Editor NEWProfiler for JRuby - abandoned: functionality was merged into jruby
Profiler for JRuby - abandoned: functionality was merged into jruby
With win32 screenshot [1] jruby-prof seems to fail to time the ffi calls. If expected then please close, but they were quite useful to have profiled in MRI (and do profile fine there).
Thanks!
[1] http://github.com/jarmo/win32screenshot
hi,
We use warbler to package our application into a .war, then deploy the application on jboss.
But how can I pass the --debug argument to rails on jboss, then let jruby-prof to work?
Thanks.
with rails3:
$ ruby --debug -S rails c
Loading development environment (Rails 3.0.0)
jruby-1.5.2 > r = JRubyProf.profile { 100.times { |i| i.to_s}}
=> #<#Class:01x83cf94:0x1b44e59>
jruby-1.5.2 > JRubyProf.print_flat_text r, "flat.txt"
Dumping trace to /test_app/flat.txt
=> []
jruby-1.5.2 > exit
$ cat flat.txt
$
plain irb:
ruby --debug -S irb
jruby-1.5.2 > require 'rubygems'
require ' => true
jruby-1.5.2 > require 'jruby-prof'
=> true
jruby-1.5.2 > r = JRubyProf.profile { 100.times { |i| i.to_s}}
=> #<#Class:01x18ddc48:0x165547d>
jruby-1.5.2 > JRubyProf.print_flat_text r, "flat.txt"
Dumping trace to /test_app/flat.txt
=> [#Java::OrgJrubyProf::Invocation:0xfb1135]
jruby-1.5.2 > exit
$ cat flat.txt
Thread 1 / 1
%self cumulative total self children calls self/call total/call name
100.00 1 1 1 0 100 0.01 0.01 Fixnum#to_s
0.00 1 1 0 1 1 0.00 1.00 #toplevel
0.00 1 1 0 1 1 0.00 1.00 Integer#times
$
Latest version of jruby-prof is compiled against Java 6. Since JRuby can run on Java 5 you may want to build releases with Java 5 bytecode as a target.
I get the following on Ubuntu AMD64:
$ RUBYOPT="--debug" rake spec
/home/me/.rvm/gems/jruby-1.5.1/gems/jruby-prof-0.1.0/lib/jruby-prof/invocation_set.rb:30:in add_methods': stack level too deep (SystemStackError) from /home/me/.rvm/rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in
call'
from /home/me/.rvm/rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in each' from /home/me/.rvm/gems/jruby-1.5.1/gems/jruby-prof-0.1.0/lib/jruby-prof/invocation_set.rb:29:in
add_methods'
from /home/me/.rvm/gems/jruby-1.5.1/gems/jruby-prof-0.1.0/lib/jruby-prof/invocation_set.rb:30:in add_methods' from /home/me/.rvm/rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in
call'
from /home/me/.rvm/rubies/jruby-1.5.1/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in each' from /home/me/.rvm/gems/jruby-1.5.1/gems/jruby-prof-0.1.0/lib/jruby-prof/invocation_set.rb:29:in
add_methods'
from /home/me/.rvm/gems/jruby-1.5.1/gems/jruby-prof-0.1.0/lib/jruby-prof/invocation_set.rb:30:in `add_methods'
... 28 levels...
from /home/media/backup/other/gems/.rvm/gems/jruby-1.5.1/gems/rake-0.8.7/bin/rake:41
jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (OpenJDK 64-Bit Server VM 1.6.0_18) [amd64-java]
Let me know if there is anything I can do to help track down the cause.
Thanks!
When I trace something like some rails requests, it is possible to see this message:
Dumping trace to C:/dev/ruby/old/ruby-benchmark-suite/benchmarks/rails/substruct/profile/call_tree.html
for like 30 minutes, the others are quite fast.
Thanks!
-r
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.