kb-simple-metrics 0.0.12-java

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.
Files changed (57) hide show
  1. data/.gitignore +20 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +13 -0
  5. data/README.md +144 -0
  6. data/Rakefile +7 -0
  7. data/doc/NurseRatched.html +246 -0
  8. data/doc/Rdio.html +233 -0
  9. data/doc/Samovar.html +241 -0
  10. data/doc/Simple/Metrics/Check.html +308 -0
  11. data/doc/Simple/Metrics/Graphite.html +262 -0
  12. data/doc/Simple/Metrics/HEALTHY.html +144 -0
  13. data/doc/Simple/Metrics/Health.html +288 -0
  14. data/doc/Simple/Metrics/Healthchecks.html +413 -0
  15. data/doc/Simple/Metrics/Meter.html +295 -0
  16. data/doc/Simple/Metrics/RackMetrics.html +366 -0
  17. data/doc/Simple/Metrics/Timer.html +232 -0
  18. data/doc/Simple/Metrics/UNHEALTHY.html +144 -0
  19. data/doc/Simple/Metrics/WARNING.html +144 -0
  20. data/doc/Simple/Metrics.html +510 -0
  21. data/doc/Simple.html +117 -0
  22. data/doc/_index.html +259 -0
  23. data/doc/class_list.html +53 -0
  24. data/doc/css/common.css +1 -0
  25. data/doc/css/full_list.css +57 -0
  26. data/doc/css/style.css +328 -0
  27. data/doc/file.README.html +224 -0
  28. data/doc/file_list.html +55 -0
  29. data/doc/frames.html +28 -0
  30. data/doc/index.html +224 -0
  31. data/doc/js/app.js +214 -0
  32. data/doc/js/full_list.js +173 -0
  33. data/doc/js/jquery.js +4 -0
  34. data/doc/method_list.html +180 -0
  35. data/doc/top-level-namespace.html +114 -0
  36. data/lib/java/jackson-core-asl-1.9.5.jar +0 -0
  37. data/lib/java/jackson-mapper-asl-1.9.5.jar +0 -0
  38. data/lib/java/metrics-core-2.1.1.jar +0 -0
  39. data/lib/java/metrics-graphite-2.1.1.jar +0 -0
  40. data/lib/java/metrics-servlet-2.1.1.jar +0 -0
  41. data/lib/java/slf4j-api-1.6.4.jar +0 -0
  42. data/lib/simple/metrics/graphite.rb +23 -0
  43. data/lib/simple/metrics/health.rb +15 -0
  44. data/lib/simple/metrics/healthcheck.rb +65 -0
  45. data/lib/simple/metrics/meter.rb +23 -0
  46. data/lib/simple/metrics/rack_metrics.rb +32 -0
  47. data/lib/simple/metrics/timer.rb +24 -0
  48. data/lib/simple/metrics.rb +51 -0
  49. data/lib/simple/version.rb +5 -0
  50. data/lib/simple.rb +6 -0
  51. data/simple-metrics.gemspec +21 -0
  52. data/spec/metrics/graphite_spec.rb +9 -0
  53. data/spec/metrics/healthcheck_spec.rb +55 -0
  54. data/spec/metrics/meter_spec.rb +20 -0
  55. data/spec/metrics/timer_spec.rb +29 -0
  56. data/spec/spec_helper.rb +13 -0
  57. metadata +182 -0
@@ -0,0 +1,232 @@
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'>
124
+ <p>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.</p>
126
+ </div></span>
127
+
128
+ </li>
129
+
130
+
131
+ </ul>
132
+
133
+
134
+
135
+
136
+ <div id="instance_method_details" class="method_details_list">
137
+ <h2>Instance Method Details</h2>
138
+
139
+
140
+ <div class="method_details first">
141
+ <h3 class="signature first" id="timer-instance_method">
142
+
143
+ - (<tt>Object</tt>) <strong>timer</strong>(name)
144
+
145
+
146
+
147
+
148
+
149
+ </h3><div class="docstring">
150
+ <div class="discussion">
151
+
152
+ <p>Create creates a new timer, registers it with the metrics registry, yields
153
+ the timer to the block and stops it when the block returns.</p>
154
+
155
+
156
+ </div>
157
+ </div>
158
+ <div class="tags">
159
+ <p class="tag_title">Parameters:</p>
160
+ <ul class="param">
161
+
162
+ <li>
163
+
164
+ <span class='name'>name</span>
165
+
166
+
167
+ <span class='type'>(<tt>String</tt>)</span>
168
+
169
+
170
+
171
+ &mdash;
172
+ <div class='inline'>
173
+ <p>The name of the timer.</p>
174
+ </div>
175
+
176
+ </li>
177
+
178
+ </ul>
179
+
180
+
181
+ </div><table class="source_code">
182
+ <tr>
183
+ <td>
184
+ <pre class="lines">
185
+
186
+
187
+ 8
188
+ 9
189
+ 10
190
+ 11
191
+ 12
192
+ 13
193
+ 14
194
+ 15
195
+ 16
196
+ 17
197
+ 18
198
+ 19</pre>
199
+ </td>
200
+ <td>
201
+ <pre class="code"><span class="info file"># File 'lib/simple/metrics/timer.rb', line 8</span>
202
+
203
+ <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>
204
+ <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>
205
+ <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>
206
+ <span class='rubyid_DEFAULT_DURATION_UNIT constant id'>DEFAULT_DURATION_UNIT</span><span class='comma token'>,</span>
207
+ <span class='rubyid_DEFAULT_RATE_UNIT constant id'>DEFAULT_RATE_UNIT</span><span class='rparen token'>)</span>
208
+ <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>
209
+ <span class='rubyid_begin begin kw'>begin</span>
210
+ <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_new_timer identifier id'>new_timer</span>
211
+ <span class='rubyid_ensure ensure kw'>ensure</span>
212
+ <span class='rubyid_captured_timer identifier id'>captured_timer</span><span class='dot token'>.</span><span class='rubyid_stop identifier id'>stop</span>
213
+ <span class='rubyid_end end kw'>end</span>
214
+ <span class='rubyid_end end kw'>end</span>
215
+ </pre>
216
+ </td>
217
+ </tr>
218
+ </table>
219
+ </div>
220
+
221
+ </div>
222
+
223
+ </div>
224
+
225
+ <div id="footer">
226
+ Generated on Mon May 13 23:22:15 2013 by
227
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
228
+ 0.8.3 (ruby-1.9.3).
229
+ </div>
230
+
231
+ </body>
232
+ </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 May 13 23:22:16 2013 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.8.3 (ruby-1.9.3).
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 May 13 23:22:16 2013 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.8.3 (ruby-1.9.3).
141
+ </div>
142
+
143
+ </body>
144
+ </html>