simple-metrics 0.0.10-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +17 -0
  2. data/.rbenv-version +1 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +13 -0
  6. data/README.md +126 -0
  7. data/Rakefile +7 -0
  8. data/doc/NurseRatched.html +246 -0
  9. data/doc/Rdio.html +245 -0
  10. data/doc/Samovar.html +241 -0
  11. data/doc/Simple/Metrics/Check.html +312 -0
  12. data/doc/Simple/Metrics/Graphite.html +268 -0
  13. data/doc/Simple/Metrics/HEALTHY.html +144 -0
  14. data/doc/Simple/Metrics/Health.html +292 -0
  15. data/doc/Simple/Metrics/Healthchecks.html +425 -0
  16. data/doc/Simple/Metrics/Meter.html +284 -0
  17. data/doc/Simple/Metrics/RackMetrics.html +371 -0
  18. data/doc/Simple/Metrics/Timer.html +235 -0
  19. data/doc/Simple/Metrics/UNHEALTHY.html +144 -0
  20. data/doc/Simple/Metrics/WARNING.html +144 -0
  21. data/doc/Simple/Metrics.html +523 -0
  22. data/doc/Simple.html +117 -0
  23. data/doc/_index.html +277 -0
  24. data/doc/class_list.html +53 -0
  25. data/doc/css/common.css +1 -0
  26. data/doc/css/full_list.css +57 -0
  27. data/doc/css/style.css +328 -0
  28. data/doc/file.README.html +210 -0
  29. data/doc/file_list.html +55 -0
  30. data/doc/frames.html +28 -0
  31. data/doc/index.html +210 -0
  32. data/doc/js/app.js +214 -0
  33. data/doc/js/full_list.js +173 -0
  34. data/doc/js/jquery.js +4 -0
  35. data/doc/method_list.html +196 -0
  36. data/doc/top-level-namespace.html +114 -0
  37. data/lib/java/jackson-core-asl-1.9.5.jar +0 -0
  38. data/lib/java/jackson-mapper-asl-1.9.5.jar +0 -0
  39. data/lib/java/metrics-core-2.1.1.jar +0 -0
  40. data/lib/java/metrics-graphite-2.1.1.jar +0 -0
  41. data/lib/java/metrics-servlet-2.1.1.jar +0 -0
  42. data/lib/java/slf4j-api-1.6.4.jar +0 -0
  43. data/lib/simple/metrics/graphite.rb +23 -0
  44. data/lib/simple/metrics/health.rb +15 -0
  45. data/lib/simple/metrics/healthcheck.rb +65 -0
  46. data/lib/simple/metrics/meter.rb +22 -0
  47. data/lib/simple/metrics/rack_metrics.rb +32 -0
  48. data/lib/simple/metrics/timer.rb +22 -0
  49. data/lib/simple/metrics.rb +51 -0
  50. data/lib/simple/version.rb +5 -0
  51. data/lib/simple.rb +6 -0
  52. data/simple-metrics.gemspec +21 -0
  53. data/spec/metrics/graphite_spec.rb +9 -0
  54. data/spec/metrics/healthcheck_spec.rb +55 -0
  55. data/spec/metrics/meter_spec.rb +20 -0
  56. data/spec/metrics/timer_spec.rb +29 -0
  57. data/spec/spec_helper.rb +13 -0
  58. metadata +174 -0
@@ -0,0 +1,235 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Simple::Metrics::Timer
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (T)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Simple.html" title="Simple (module)">Simple</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Metrics.html" title="Simple::Metrics (module)">Metrics</a></span></span>
36
+ &raquo;
37
+ <span class="title">Timer</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Simple::Metrics::Timer
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1">Included in:</dt>
81
+ <dd class="r1"><span class='object_link'><a href="../Metrics.html" title="Simple::Metrics (module)">Simple::Metrics</a></span></dd>
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/simple/metrics/timer.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <h2>
100
+ Instance Method Summary
101
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
102
+ </h2>
103
+
104
+ <ul class="summary">
105
+
106
+ <li class="public ">
107
+ <span class="summary_signature">
108
+
109
+ <a href="#timer-instance_method" title="#timer (instance method)">- (Object) <strong>timer</strong>(name) </a>
110
+
111
+
112
+
113
+ </span>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"><div class='inline'><p>
124
+ Create creates a new timer, registers it with the metrics registry, yields
125
+ the timer to the block and stops it when the block returns.
126
+ </p>
127
+ </div></span>
128
+
129
+ </li>
130
+
131
+
132
+ </ul>
133
+
134
+
135
+
136
+
137
+ <div id="instance_method_details" class="method_details_list">
138
+ <h2>Instance Method Details</h2>
139
+
140
+
141
+ <div class="method_details first">
142
+ <h3 class="signature first" id="timer-instance_method">
143
+
144
+ - (<tt>Object</tt>) <strong>timer</strong>(name)
145
+
146
+
147
+
148
+
149
+
150
+ </h3><div class="docstring">
151
+ <div class="discussion">
152
+ <p>
153
+ Create creates a new timer, registers it with the metrics registry, yields
154
+ the timer to the block and stops it when the block returns.
155
+ </p>
156
+
157
+
158
+ </div>
159
+ </div>
160
+ <div class="tags">
161
+ <p class="tag_title">Parameters:</p>
162
+ <ul class="param">
163
+
164
+ <li>
165
+
166
+ <span class='name'>name</span>
167
+
168
+
169
+ <span class='type'>(<tt>String</tt>)</span>
170
+
171
+
172
+
173
+ &mdash;
174
+ <div class='inline'><p>
175
+ The name of the timer.
176
+ </p>
177
+ </div>
178
+
179
+ </li>
180
+
181
+ </ul>
182
+
183
+
184
+ </div><table class="source_code">
185
+ <tr>
186
+ <td>
187
+ <pre class="lines">
188
+
189
+
190
+ 8
191
+ 9
192
+ 10
193
+ 11
194
+ 12
195
+ 13
196
+ 14
197
+ 15
198
+ 16
199
+ 17
200
+ 18
201
+ 19</pre>
202
+ </td>
203
+ <td>
204
+ <pre class="code"><span class="info file"># File 'lib/simple/metrics/timer.rb', line 8</span>
205
+
206
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_timer identifier id'>timer</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
207
+ <span class='rubyid_metric_name identifier id'>metric_name</span> <span class='assign token'>=</span> <span class='rubyid_new_metric_name identifier id'>new_metric_name</span><span class='lparen token'>(</span><span class='rubyid_sanitize_classname identifier id'>sanitize_classname</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='string val'>&quot;timer&quot;</span><span class='rparen token'>)</span>
208
+ <span class='rubyid_new_timer identifier id'>new_timer</span> <span class='assign token'>=</span> <span class='rubyid_metrics_registry identifier id'>metrics_registry</span><span class='dot token'>.</span><span class='rubyid_newTimer identifier id'>newTimer</span><span class='lparen token'>(</span><span class='rubyid_metric_name identifier id'>metric_name</span><span class='comma token'>,</span>
209
+ <span class='rubyid_DEFAULT_DURATION_UNIT constant id'>DEFAULT_DURATION_UNIT</span><span class='comma token'>,</span>
210
+ <span class='rubyid_DEFAULT_RATE_UNIT constant id'>DEFAULT_RATE_UNIT</span><span class='rparen token'>)</span>
211
+ <span class='rubyid_captured_timer identifier id'>captured_timer</span> <span class='assign token'>=</span> <span class='rubyid_new_timer identifier id'>new_timer</span><span class='dot token'>.</span><span class='rubyid_time identifier id'>time</span>
212
+ <span class='rubyid_begin begin kw'>begin</span>
213
+ <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_new_timer identifier id'>new_timer</span>
214
+ <span class='rubyid_ensure ensure kw'>ensure</span>
215
+ <span class='rubyid_captured_timer identifier id'>captured_timer</span><span class='dot token'>.</span><span class='rubyid_stop identifier id'>stop</span>
216
+ <span class='rubyid_end end kw'>end</span>
217
+ <span class='rubyid_end end kw'>end</span>
218
+ </pre>
219
+ </td>
220
+ </tr>
221
+ </table>
222
+ </div>
223
+
224
+ </div>
225
+
226
+ </div>
227
+
228
+ <div id="footer">
229
+ Generated on Mon Nov 05 22:03:43 2012 by
230
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
231
+ 0.8.3 (ruby-1.9.2).
232
+ </div>
233
+
234
+ </body>
235
+ </html>
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Simple::Metrics::UNHEALTHY
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (U)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Simple.html" title="Simple (module)">Simple</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Metrics.html" title="Simple::Metrics (module)">Metrics</a></span></span>
36
+ &raquo;
37
+ <span class="title">UNHEALTHY</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Simple::Metrics::UNHEALTHY
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></li>
82
+
83
+ <li class="next">Simple::Metrics::UNHEALTHY</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/simple/metrics/health.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="Health.html#message-instance_method" title="Simple::Metrics::Health#message (method)">#message</a></span></p>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>Method Summary</h2>
124
+
125
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></h3>
126
+ <p class="inherited"><span class='object_link'><a href="Health.html#initialize-instance_method" title="Simple::Metrics::Health#initialize (method)">#initialize</a></span></p>
127
+ <div id="constructor_details" class="method_details_list">
128
+ <h2>Constructor Details</h2>
129
+
130
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Health.html#initialize-instance_method" title="Simple::Metrics::Health#initialize (method)">Simple::Metrics::Health</a></span></p>
131
+
132
+ </div>
133
+
134
+
135
+ </div>
136
+
137
+ <div id="footer">
138
+ Generated on Mon Nov 05 22:03:44 2012 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.8.3 (ruby-1.9.2).
141
+ </div>
142
+
143
+ </body>
144
+ </html>
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Simple::Metrics::WARNING
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (W)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Simple.html" title="Simple (module)">Simple</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Metrics.html" title="Simple::Metrics (module)">Metrics</a></span></span>
36
+ &raquo;
37
+ <span class="title">WARNING</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Simple::Metrics::WARNING
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName"><span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></li>
82
+
83
+ <li class="next">Simple::Metrics::WARNING</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/simple/metrics/health.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="Health.html#message-instance_method" title="Simple::Metrics::Health#message (method)">#message</a></span></p>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>Method Summary</h2>
124
+
125
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Health.html" title="Simple::Metrics::Health (class)">Health</a></span></h3>
126
+ <p class="inherited"><span class='object_link'><a href="Health.html#initialize-instance_method" title="Simple::Metrics::Health#initialize (method)">#initialize</a></span></p>
127
+ <div id="constructor_details" class="method_details_list">
128
+ <h2>Constructor Details</h2>
129
+
130
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Health.html#initialize-instance_method" title="Simple::Metrics::Health#initialize (method)">Simple::Metrics::Health</a></span></p>
131
+
132
+ </div>
133
+
134
+
135
+ </div>
136
+
137
+ <div id="footer">
138
+ Generated on Mon Nov 05 22:03:44 2012 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.8.3 (ruby-1.9.2).
141
+ </div>
142
+
143
+ </body>
144
+ </html>