ruby-prof 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +25 -9
- data/{README.rdoc → README.md} +2 -2
- data/Rakefile +3 -3
- data/ext/ruby_prof/rp_call_tree.c +0 -2
- data/ext/ruby_prof/rp_call_tree.h +1 -1
- 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 +1 -1
- data/ext/ruby_prof/rp_measurement.h +1 -1
- data/ext/ruby_prof/rp_profile.c +18 -3
- data/ext/ruby_prof/vc/ruby_prof.vcxproj +8 -6
- data/lib/ruby-prof/assets/call_stack_printer.html.erb +2 -1
- data/lib/ruby-prof/printers/call_tree_printer.rb +3 -7
- data/lib/ruby-prof/printers/graph_html_printer.rb +1 -1
- data/lib/ruby-prof/version.rb +1 -1
- data/ruby-prof.gemspec +2 -3
- data/test/alias_test.rb +97 -101
- data/test/duplicate_names_test.rb +4 -4
- data/test/dynamic_method_test.rb +23 -9
- data/test/marshal_test.rb +15 -2
- data/test/measure_allocations.rb +1 -5
- data/test/measure_allocations_test.rb +27 -69
- data/test/measure_memory_test.rb +688 -0
- data/test/measure_process_time_test.rb +1564 -735
- data/test/measure_wall_time_test.rb +6 -15
- data/test/printer_call_tree_test.rb +2 -2
- data/test/recursive_test.rb +372 -148
- data/test/test_helper.rb +4 -8
- data/test/unique_call_path_test.rb +24 -8
- data/test/yarv_test.rb +8 -4
- metadata +10 -26
- data/test/measure_allocations_trace_test.rb +0 -375
- data/test/measure_memory_trace_test.rb +0 -1460
- 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
|