Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/stackprof/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def max_samples
end

def files
@data[:files] ||= @data[:frames].inject(Hash.new) do |hash, (addr, frame)|
@data[:files] ||= @data[:frames].inject(Hash.new) do |hash, (_addr, frame)|
if file = frame[:file] and lines = frame[:lines]
hash[file] ||= Hash.new
lines.each do |line, weight|
Expand Down
1 change: 0 additions & 1 deletion test/test_stackprof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ def test_gc
end
end

raw = profile[:raw]
gc_frame = profile[:frames].values.find{ |f| f[:name] == "(garbage collection)" }
assert gc_frame
assert_equal gc_frame[:samples], profile[:gc_samples]
Expand Down