ruby-prof 1.4.3 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGES +59 -9
 - data/{README.rdoc → README.md} +2 -2
 - data/Rakefile +4 -4
 - data/bin/ruby-prof +100 -87
 - data/ext/ruby_prof/rp_allocation.c +140 -85
 - data/ext/ruby_prof/rp_allocation.h +8 -6
 - data/ext/ruby_prof/rp_call_tree.c +502 -369
 - data/ext/ruby_prof/rp_call_tree.h +47 -43
 - data/ext/ruby_prof/rp_call_trees.c +16 -8
 - data/ext/ruby_prof/rp_measure_allocations.c +10 -13
 - data/ext/ruby_prof/rp_measure_memory.c +8 -4
 - data/ext/ruby_prof/rp_measure_process_time.c +7 -6
 - data/ext/ruby_prof/rp_measurement.c +147 -20
 - data/ext/ruby_prof/rp_measurement.h +4 -1
 - data/ext/ruby_prof/rp_method.c +142 -83
 - data/ext/ruby_prof/rp_method.h +63 -62
 - data/ext/ruby_prof/rp_profile.c +933 -900
 - data/ext/ruby_prof/rp_profile.h +1 -0
 - data/ext/ruby_prof/rp_thread.c +433 -362
 - data/ext/ruby_prof/rp_thread.h +39 -39
 - data/ext/ruby_prof/ruby_prof.c +0 -2
 - data/ext/ruby_prof/ruby_prof.h +8 -0
 - data/ext/ruby_prof/vc/ruby_prof.vcxproj +11 -8
 - data/lib/ruby-prof/assets/call_stack_printer.html.erb +2 -1
 - data/lib/ruby-prof/compatibility.rb +14 -0
 - data/lib/ruby-prof/method_info.rb +8 -1
 - data/lib/ruby-prof/printers/abstract_printer.rb +2 -1
 - data/lib/ruby-prof/printers/call_tree_printer.rb +4 -10
 - data/lib/ruby-prof/printers/graph_html_printer.rb +1 -1
 - data/lib/ruby-prof/printers/multi_printer.rb +17 -17
 - data/lib/ruby-prof/profile.rb +70 -37
 - data/lib/ruby-prof/rack.rb +31 -21
 - data/lib/ruby-prof/version.rb +1 -1
 - data/lib/ruby-prof.rb +1 -1
 - data/ruby-prof.gemspec +2 -3
 - data/test/abstract_printer_test.rb +1 -0
 - data/test/alias_test.rb +97 -106
 - data/test/call_tree_builder.rb +126 -0
 - data/test/call_tree_test.rb +94 -0
 - data/test/call_tree_visitor_test.rb +1 -6
 - data/test/call_trees_test.rb +6 -6
 - data/test/{basic_test.rb → compatibility_test.rb} +8 -2
 - data/test/duplicate_names_test.rb +5 -5
 - data/test/dynamic_method_test.rb +24 -15
 - data/test/enumerable_test.rb +1 -1
 - data/test/exceptions_test.rb +2 -2
 - data/test/exclude_methods_test.rb +3 -8
 - data/test/exclude_threads_test.rb +4 -9
 - data/test/fiber_test.rb +74 -8
 - data/test/gc_test.rb +11 -9
 - data/test/inverse_call_tree_test.rb +33 -34
 - data/test/line_number_test.rb +37 -61
 - data/test/marshal_test.rb +16 -3
 - data/test/measure_allocations.rb +1 -5
 - data/test/measure_allocations_test.rb +642 -357
 - data/test/{measure_memory_trace_test.rb → measure_memory_test.rb} +180 -616
 - data/test/measure_process_time_test.rb +1566 -741
 - data/test/measure_wall_time_test.rb +179 -193
 - data/test/measurement_test.rb +82 -0
 - data/test/merge_test.rb +146 -0
 - data/test/method_info_test.rb +95 -0
 - data/test/multi_printer_test.rb +0 -5
 - data/test/no_method_class_test.rb +1 -1
 - data/test/pause_resume_test.rb +12 -16
 - data/test/printer_call_stack_test.rb +2 -2
 - data/test/printer_call_tree_test.rb +4 -4
 - data/test/printer_flat_test.rb +1 -1
 - data/test/printer_graph_html_test.rb +2 -2
 - data/test/printer_graph_test.rb +2 -2
 - data/test/printers_test.rb +14 -20
 - data/test/printing_recursive_graph_test.rb +2 -2
 - data/test/profile_test.rb +85 -0
 - data/test/recursive_test.rb +374 -155
 - data/test/scheduler.rb +363 -0
 - data/test/singleton_test.rb +1 -1
 - data/test/stack_printer_test.rb +5 -8
 - data/test/start_stop_test.rb +11 -14
 - data/test/test_helper.rb +11 -8
 - data/test/thread_test.rb +106 -15
 - data/test/unique_call_path_test.rb +28 -12
 - data/test/yarv_test.rb +11 -7
 - metadata +17 -29
 - data/ext/ruby_prof/rp_aggregate_call_tree.c +0 -59
 - data/ext/ruby_prof/rp_aggregate_call_tree.h +0 -13
 - data/test/measure_allocations_trace_test.rb +0 -375
 - data/test/temp.rb +0 -20
 
    
        data/test/temp.rb
    DELETED
    
    | 
         @@ -1,20 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require 'redis'
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            path = File.expand_path(File.join(__dir__, '..', 'lib'))
         
     | 
| 
       4 
     | 
    
         
            -
            $LOAD_PATH << path
         
     | 
| 
       5 
     | 
    
         
            -
            require 'ruby-prof'
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            Widget = Struct.new(:key) do
         
     | 
| 
       8 
     | 
    
         
            -
              def set!
         
     | 
| 
       9 
     | 
    
         
            -
                Redis.current.set(key, 1, ex: 10)
         
     | 
| 
       10 
     | 
    
         
            -
              end
         
     | 
| 
       11 
     | 
    
         
            -
            end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            result = RubyProf.profile do
         
     | 
| 
       14 
     | 
    
         
            -
              (1..20).each { |i| Widget.new(i).set! }
         
     | 
| 
       15 
     | 
    
         
            -
            end
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            printer = RubyProf::CallStackPrinter.new(result)
         
     | 
| 
       18 
     | 
    
         
            -
            File.open("framez.html", 'w:ASCII-8BIT') do |file|
         
     | 
| 
       19 
     | 
    
         
            -
              printer.print(file, {})
         
     | 
| 
       20 
     | 
    
         
            -
            end
         
     |