1
0
mirror of https://github.com/specht/champ.git synced 2024-11-22 20:31:46 +00:00

call graph: show average CC/call instead of total CC per subroutine

This commit is contained in:
Michael Specht 2018-02-16 17:36:18 +01:00
parent 3b725e94e2
commit df84df0631
2 changed files with 3 additions and 1 deletions

View File

@ -622,7 +622,9 @@ class Champ
all_nodes.each do |node|
label = @label_for_pc[node] || sprintf('0x%04x', node)
label = "<B>#{label}</B>"
label += "<BR/>#{@cycles_per_function[node]}"
if @calls_per_function[node] && @cycles_per_function[node]
label += "<BR/>#{@cycles_per_function[node] / @calls_per_function[node]}"
end
io.puts " _#{node} [label = <#{label}>];"
end
@call_graph_counts.each_pair do |key, entries|

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 KiB

After

Width:  |  Height:  |  Size: 302 KiB