From b4e9b24de62a53d3a467f20cdd6ed1da4f4d2b33 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 25 Apr 2007 04:10:55 +0000 Subject: * ext/probeprofiler: set eol-style. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/probeprofiler/lib/probeprofile.rb | 14 +++++++------- ext/probeprofiler/lib/probeprofiler.rb | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'ext/probeprofiler/lib') diff --git a/ext/probeprofiler/lib/probeprofile.rb b/ext/probeprofiler/lib/probeprofile.rb index f5ff40d2c..ef722b59d 100644 --- a/ext/probeprofiler/lib/probeprofile.rb +++ b/ext/probeprofiler/lib/probeprofile.rb @@ -1,7 +1,7 @@ -require 'probeprofiler' -END{ - ProbeProfiler.stop_profile - ProbeProfiler.print_profile -} - -ProbeProfiler.start_profile +require 'probeprofiler' +END{ + ProbeProfiler.stop_profile + ProbeProfiler.print_profile +} + +ProbeProfiler.start_profile diff --git a/ext/probeprofiler/lib/probeprofiler.rb b/ext/probeprofiler/lib/probeprofiler.rb index e014adda2..a00b6df65 100644 --- a/ext/probeprofiler/lib/probeprofiler.rb +++ b/ext/probeprofiler/lib/probeprofiler.rb @@ -1,14 +1,14 @@ - -require 'probeprofiler.so' - -def ProbeProfiler.print_profile - data = ProbeProfiler.profile_data - total = 0.0 - printf("%-60s %-8s %-7s\n", "ProbeProfile Result: Method signature", "count", "ratio") - data.map{|k, n| total += n; [n, k]}.sort.reverse.each{|n, sig| - # - printf("%-60s %8d %7.2f%%\n", sig, n, 100 * n / total) - } - printf("%60s %8d\n", "total:", total) -end - + +require 'probeprofiler.so' + +def ProbeProfiler.print_profile + data = ProbeProfiler.profile_data + total = 0.0 + printf("%-60s %-8s %-7s\n", "ProbeProfile Result: Method signature", "count", "ratio") + data.map{|k, n| total += n; [n, k]}.sort.reverse.each{|n, sig| + # + printf("%-60s %8d %7.2f%%\n", sig, n, 100 * n / total) + } + printf("%60s %8d\n", "total:", total) +end + -- cgit