Skip to content

krunal/rblineprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rblineprof

% ruby -C ext extconf.rb
% make -C ext
% ruby test.rb 
       | $:.unshift 'ext'
       | require 'rblineprof'
       | 
       | profile = lineprof(/./) do
     1 |    1000.times do
       | 
   410 |      1*2*3
   441 |      4*5*6
  1243 |      7*8*9*10*11*12*13*14*15
   380 |      2**32
  1115 |      2**128
       | 
       |   end
       | end
       | 
       | File.readlines(__FILE__).each_with_index do |line, num|
       |   if (sample = profile[__FILE__][num+1]) > 0
       |     printf "% 6d |  %s", sample, line
       |   else
       |     printf "       | %s", line
       |   end
       | end

Other profilers

About

line-profiler for ruby 1.8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published