meta_profiler 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/meta_profiler/profile.rb +5 -5
- data/lib/meta_profiler/version.rb +1 -1
- metadata +21 -6
@@ -84,16 +84,16 @@ def profile_java_style(opts)
|
|
84
84
|
profile_printer.printProfile(STDOUT)
|
85
85
|
end
|
86
86
|
|
87
|
-
def profile(title = nil, opts = {})
|
87
|
+
def profile(title = nil, opts = {}, &block)
|
88
88
|
GC.disable if opts[:no_gc]
|
89
89
|
puts title if title
|
90
90
|
|
91
91
|
if defined?(Rubinius)
|
92
|
-
profile_rubinius_style(opts)
|
93
|
-
elsif defined?(JRuby)
|
94
|
-
profile_java_style(opts)
|
92
|
+
profile_rubinius_style(opts, &block)
|
93
|
+
elsif defined?(JRuby, &block )
|
94
|
+
profile_java_style(opts, &block)
|
95
95
|
else
|
96
|
-
profile_rubyprof_style(opts)
|
96
|
+
profile_rubyprof_style(opts, &block)
|
97
97
|
end
|
98
98
|
|
99
99
|
puts "--------------------------------------------------------------------------------"
|
metadata
CHANGED
@@ -1,16 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_profiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Joe Fredette
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
13
|
-
dependencies:
|
12
|
+
date: 2012-09-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: ruby-prof
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description: Abstracts over the interfaces to the various implementation-specific
|
15
31
|
profiling tools
|
16
32
|
email:
|
@@ -34,17 +50,17 @@ rdoc_options: []
|
|
34
50
|
require_paths:
|
35
51
|
- lib
|
36
52
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
37
54
|
requirements:
|
38
55
|
- - ! '>='
|
39
56
|
- !ruby/object:Gem::Version
|
40
57
|
version: '0'
|
41
|
-
none: false
|
42
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
43
60
|
requirements:
|
44
61
|
- - ! '>='
|
45
62
|
- !ruby/object:Gem::Version
|
46
63
|
version: '0'
|
47
|
-
none: false
|
48
64
|
requirements: []
|
49
65
|
rubyforge_project:
|
50
66
|
rubygems_version: 1.8.24
|
@@ -59,4 +75,3 @@ summary: ! 'meta_profiler provides a single interface to profile small chunks of
|
|
59
75
|
write your code in a `profile { #code }` block, simply running your desired version
|
60
76
|
of ruby on that script will then automatically print profiling results to STDOUT.'
|
61
77
|
test_files: []
|
62
|
-
has_rdoc:
|