zenprofile 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ �.�k=ț�0���䶐���"� _0���y;Fޞׄ5�2]g1rv}oN��k�:Zϰ�al�3���\:ͷ.���֨#-������qgӱϛY��ݒ:��O"Q(^�]��Vp��j��Ր�xNl_o~.��A�E]���{��z3�
@@ -1,3 +1,10 @@
1
+ === 1.3.0 / 2010-09-02
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Added spy_cm and spy_on_cm for class methods
6
+ * Improved zenprofile output for class methods. ENV really sucks.
7
+
1
8
  === 1.2.0 / 2009-08-14
2
9
 
3
10
  * 1 minor enhancement:
@@ -62,9 +62,21 @@ class Module
62
62
  end "
63
63
  end
64
64
 
65
+ def spy_cm *args
66
+ this_sucks.spy *args
67
+ end
68
+
65
69
  def spy_on *msgs
66
70
  msgs.each do |msg|
67
71
  spy msg
68
72
  end
69
73
  end
74
+
75
+ def spy_on_cm *msgs
76
+ this_sucks.spy_on *msgs
77
+ end
78
+
79
+ def this_sucks
80
+ class << self; self; end
81
+ end
70
82
  end
@@ -17,7 +17,7 @@ require 'event_hook'
17
17
  # % ruby -rzenprofile misc/factorial.rb
18
18
 
19
19
  class ZenProfiler < EventHook
20
- VERSION = '1.2.0'
20
+ VERSION = '1.3.0'
21
21
 
22
22
  @@start = nil
23
23
  @@stack = [[0, 0, [nil, :toplevel]], [0, 0, [nil, :dummy]]]
@@ -80,7 +80,7 @@ class ZenProfiler < EventHook
80
80
  klassname = klass.name rescue klass.to_s.sub(/#<\S+:(\S+)>/, '\\1')
81
81
  "#{klassname}##{meth}"
82
82
  else
83
- "#{klass.class}##{meth}"
83
+ "#{klass}##{meth}"
84
84
  end
85
85
 
86
86
  f.printf "%6.2f ", percent_time
@@ -101,6 +101,7 @@ class ZenProfiler < EventHook
101
101
  now = Process.times[0]
102
102
  @@stack.push [now, 0.0]
103
103
  when RETURN, CRETURN
104
+ klass = klass.name rescue return
104
105
  key = [klass, method]
105
106
  if tick = @@stack.pop
106
107
  now = Process.times[0]
@@ -206,3 +207,20 @@ class ZenProfiler < EventHook
206
207
  end
207
208
  end
208
209
  end
210
+
211
+ class << ENV
212
+ def class
213
+ Class
214
+ end
215
+
216
+ def name
217
+ "ENV"
218
+ end
219
+ end
220
+
221
+ class << self
222
+ def name
223
+ "::main"
224
+ end
225
+ end
226
+
metadata CHANGED
@@ -1,47 +1,120 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zenprofile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - Ryan Davis
8
14
  autorequire:
9
15
  bindir: bin
10
- cert_chain: []
16
+ cert_chain:
17
+ - |
18
+ -----BEGIN CERTIFICATE-----
19
+ MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
20
+ ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
21
+ GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
22
+ AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
23
+ JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
24
+ b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
25
+ taCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT
26
+ oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
27
+ GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
28
+ qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
29
+ gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
30
+ HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
31
+ AQAY59gYvDxqSqgC92nAP9P8dnGgfZgLxP237xS6XxFGJSghdz/nI6pusfCWKM8m
32
+ vzjjH2wUMSSf3tNudQ3rCGLf2epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
33
+ w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
34
+ l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
35
+ n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
36
+ FBHgymkyj/AOSqKRIpXPhjC6
37
+ -----END CERTIFICATE-----
11
38
 
12
- date: 2009-08-14 00:00:00 -07:00
39
+ date: 2010-09-02 00:00:00 -07:00
13
40
  default_executable:
14
41
  dependencies:
15
42
  - !ruby/object:Gem::Dependency
16
43
  name: ZenTest
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
44
+ prerelease: false
45
+ requirement: &id001 !ruby/object:Gem::Requirement
46
+ none: false
20
47
  requirements:
21
48
  - - ">="
22
49
  - !ruby/object:Gem::Version
50
+ hash: 3
51
+ segments:
52
+ - 0
23
53
  version: "0"
24
- version:
54
+ type: :runtime
55
+ version_requirements: *id001
25
56
  - !ruby/object:Gem::Dependency
26
57
  name: event_hook
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
58
+ prerelease: false
59
+ requirement: &id002 !ruby/object:Gem::Requirement
60
+ none: false
30
61
  requirements:
31
62
  - - ">="
32
63
  - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 0
33
67
  version: "0"
34
- version:
68
+ type: :runtime
69
+ version_requirements: *id002
35
70
  - !ruby/object:Gem::Dependency
36
- name: hoe
71
+ name: rubyforge
72
+ prerelease: false
73
+ requirement: &id003 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 7
79
+ segments:
80
+ - 2
81
+ - 0
82
+ - 4
83
+ version: 2.0.4
37
84
  type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
85
+ version_requirements: *id003
86
+ - !ruby/object:Gem::Dependency
87
+ name: minitest
88
+ prerelease: false
89
+ requirement: &id004 !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ hash: 9
95
+ segments:
96
+ - 1
97
+ - 7
98
+ - 1
99
+ version: 1.7.1
100
+ type: :development
101
+ version_requirements: *id004
102
+ - !ruby/object:Gem::Dependency
103
+ name: hoe
104
+ prerelease: false
105
+ requirement: &id005 !ruby/object:Gem::Requirement
106
+ none: false
40
107
  requirements:
41
108
  - - ">="
42
109
  - !ruby/object:Gem::Version
43
- version: 2.3.3
44
- version:
110
+ hash: 19
111
+ segments:
112
+ - 2
113
+ - 6
114
+ - 2
115
+ version: 2.6.2
116
+ type: :development
117
+ version_requirements: *id005
45
118
  description: |-
46
119
  zenprofiler helps answer WHAT is being called the most. spy_on helps
47
120
  answer WHERE those calls are being made. ZenProfiler provides a faster
@@ -106,21 +179,27 @@ rdoc_options:
106
179
  require_paths:
107
180
  - lib
108
181
  required_ruby_version: !ruby/object:Gem::Requirement
182
+ none: false
109
183
  requirements:
110
184
  - - ">="
111
185
  - !ruby/object:Gem::Version
186
+ hash: 3
187
+ segments:
188
+ - 0
112
189
  version: "0"
113
- version:
114
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
+ none: false
115
192
  requirements:
116
193
  - - ">="
117
194
  - !ruby/object:Gem::Version
195
+ hash: 3
196
+ segments:
197
+ - 0
118
198
  version: "0"
119
- version:
120
199
  requirements: []
121
200
 
122
201
  rubyforge_project: seattlerb
123
- rubygems_version: 1.3.5
202
+ rubygems_version: 1.3.7
124
203
  signing_key:
125
204
  specification_version: 3
126
205
  summary: zenprofiler helps answer WHAT is being called the most
Binary file