Skip to content

Commit

Permalink
Add Brief Statistics From Deductions
Browse files Browse the repository at this point in the history
  • Loading branch information
fundamental committed May 2, 2015
1 parent f92aa08 commit 9a81ebe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/deductions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,16 @@ def self.setup(callgraph)
end
d
end

def self.print_stats(deductions)
realtime = 0
nonrealtime = 0
deductions.each do |d|
realtime += 1 if d.realtime_p
nonrealtime += 1 if d.non_realtime_p
end
puts "Total Functions: #{deductions.length}"
puts "Total Realtime: #{realtime}"
puts "Total NonRealtime: #{nonrealtime}"
end
end
1 change: 1 addition & 0 deletions stoat
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ end
deductions = Deductions::setup(callgraph)
Deductions::deduce_safe(deductions, callgraph)
error_count = Deductions::dump_errors(deductions, callgraph)
Deductions::print_stats deductions

################################################################################
# Save Graph #
Expand Down

0 comments on commit 9a81ebe

Please sign in to comment.