diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-25 04:10:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-25 04:10:55 +0000 |
commit | 5bda3debcf2493308afd8d5c7d5ee306d5980828 (patch) | |
tree | 96b9cd171bfef56dee38199674d82e57444a2abe /ext/probeprofiler/lib/probeprofiler.rb | |
parent | abcbd7ea38f64f942a934ba065aabf9da81a21bc (diff) |
* ext/probeprofiler: set eol-style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/probeprofiler/lib/probeprofiler.rb')
-rw-r--r-- | ext/probeprofiler/lib/probeprofiler.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/probeprofiler/lib/probeprofiler.rb b/ext/probeprofiler/lib/probeprofiler.rb index e014adda2f..a00b6df653 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 + |