blackbeard 0.0.4.0 → 0.0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +44 -16
- data/TODO.md +3 -1
- data/dashboard/routes/cohorts.rb +25 -0
- data/dashboard/routes/features.rb +7 -4
- data/dashboard/routes/groups.rb +6 -3
- data/dashboard/routes/metrics.rb +25 -5
- data/dashboard/routes/tests.rb +6 -3
- data/dashboard/views/cohorts/index.erb +22 -0
- data/dashboard/views/cohorts/show.erb +41 -0
- data/dashboard/views/groups/show.erb +2 -2
- data/dashboard/views/layout.erb +1 -0
- data/dashboard/views/metrics/show.erb +37 -10
- data/dashboard/views/shared/_charts.erb +20 -0
- data/lib/blackbeard/chart.rb +65 -0
- data/lib/blackbeard/chartable.rb +47 -0
- data/lib/blackbeard/cohort.rb +48 -0
- data/lib/blackbeard/cohort_data.rb +72 -0
- data/lib/blackbeard/cohort_metric.rb +47 -0
- data/lib/blackbeard/context.rb +11 -2
- data/lib/blackbeard/dashboard.rb +2 -3
- data/lib/blackbeard/dashboard_helpers.rb +0 -22
- data/lib/blackbeard/errors.rb +2 -0
- data/lib/blackbeard/group.rb +3 -0
- data/lib/blackbeard/group_metric.rb +39 -0
- data/lib/blackbeard/metric.rb +30 -14
- data/lib/blackbeard/metric_data/base.rb +18 -35
- data/lib/blackbeard/metric_data/total.rb +2 -1
- data/lib/blackbeard/metric_data/uid_generator.rb +38 -0
- data/lib/blackbeard/metric_data/unique.rb +1 -1
- data/lib/blackbeard/metric_date.rb +10 -0
- data/lib/blackbeard/metric_hour.rb +8 -0
- data/lib/blackbeard/pirate.rb +18 -0
- data/lib/blackbeard/redis_store.rb +10 -1
- data/lib/blackbeard/storable.rb +1 -0
- data/lib/blackbeard/version.rb +1 -1
- data/spec/chart_spec.rb +38 -0
- data/spec/chartable_spec.rb +56 -0
- data/spec/cohort_data_spec.rb +142 -0
- data/spec/cohort_metric_spec.rb +26 -0
- data/spec/cohort_spec.rb +31 -0
- data/spec/context_spec.rb +9 -1
- data/spec/dashboard/cohorts_spec.rb +43 -0
- data/spec/dashboard/groups_spec.rb +0 -7
- data/spec/dashboard/metrics_spec.rb +35 -0
- data/spec/group_metric_spec.rb +26 -0
- data/spec/metric_data/base_spec.rb +0 -16
- data/spec/metric_data/uid_generator_spec.rb +40 -0
- data/spec/metric_spec.rb +23 -12
- data/spec/pirate_spec.rb +22 -1
- data/spec/redis_store_spec.rb +8 -2
- data/spec/storable_spec.rb +3 -0
- metadata +29 -3
- data/dashboard/views/metrics/_metric_data.erb +0 -59
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackbeard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Graff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -222,23 +222,31 @@ files:
|
|
222
222
|
- dashboard/public/stylesheets/bootstrap-theme.css
|
223
223
|
- dashboard/public/stylesheets/bootstrap.css
|
224
224
|
- dashboard/routes/base.rb
|
225
|
+
- dashboard/routes/cohorts.rb
|
225
226
|
- dashboard/routes/features.rb
|
226
227
|
- dashboard/routes/groups.rb
|
227
228
|
- dashboard/routes/home.rb
|
228
229
|
- dashboard/routes/metrics.rb
|
229
230
|
- dashboard/routes/tests.rb
|
231
|
+
- dashboard/views/cohorts/index.erb
|
232
|
+
- dashboard/views/cohorts/show.erb
|
230
233
|
- dashboard/views/features/index.erb
|
231
234
|
- dashboard/views/features/show.erb
|
232
235
|
- dashboard/views/groups/index.erb
|
233
236
|
- dashboard/views/groups/show.erb
|
234
237
|
- dashboard/views/index.erb
|
235
238
|
- dashboard/views/layout.erb
|
236
|
-
- dashboard/views/metrics/_metric_data.erb
|
237
239
|
- dashboard/views/metrics/index.erb
|
238
240
|
- dashboard/views/metrics/show.erb
|
241
|
+
- dashboard/views/shared/_charts.erb
|
239
242
|
- dashboard/views/tests/index.erb
|
240
243
|
- dashboard/views/tests/show.erb
|
241
244
|
- lib/blackbeard.rb
|
245
|
+
- lib/blackbeard/chart.rb
|
246
|
+
- lib/blackbeard/chartable.rb
|
247
|
+
- lib/blackbeard/cohort.rb
|
248
|
+
- lib/blackbeard/cohort_data.rb
|
249
|
+
- lib/blackbeard/cohort_metric.rb
|
242
250
|
- lib/blackbeard/configuration.rb
|
243
251
|
- lib/blackbeard/configuration_methods.rb
|
244
252
|
- lib/blackbeard/context.rb
|
@@ -248,9 +256,11 @@ files:
|
|
248
256
|
- lib/blackbeard/feature.rb
|
249
257
|
- lib/blackbeard/feature_rollout.rb
|
250
258
|
- lib/blackbeard/group.rb
|
259
|
+
- lib/blackbeard/group_metric.rb
|
251
260
|
- lib/blackbeard/metric.rb
|
252
261
|
- lib/blackbeard/metric_data/base.rb
|
253
262
|
- lib/blackbeard/metric_data/total.rb
|
263
|
+
- lib/blackbeard/metric_data/uid_generator.rb
|
254
264
|
- lib/blackbeard/metric_data/unique.rb
|
255
265
|
- lib/blackbeard/metric_date.rb
|
256
266
|
- lib/blackbeard/metric_hour.rb
|
@@ -264,8 +274,14 @@ files:
|
|
264
274
|
- lib/blackbeard/test.rb
|
265
275
|
- lib/blackbeard/version.rb
|
266
276
|
- spec/blackbeard_spec.rb
|
277
|
+
- spec/chart_spec.rb
|
278
|
+
- spec/chartable_spec.rb
|
279
|
+
- spec/cohort_data_spec.rb
|
280
|
+
- spec/cohort_metric_spec.rb
|
281
|
+
- spec/cohort_spec.rb
|
267
282
|
- spec/configuration_spec.rb
|
268
283
|
- spec/context_spec.rb
|
284
|
+
- spec/dashboard/cohorts_spec.rb
|
269
285
|
- spec/dashboard/features_spec.rb
|
270
286
|
- spec/dashboard/groups_spec.rb
|
271
287
|
- spec/dashboard/home_spec.rb
|
@@ -273,9 +289,11 @@ files:
|
|
273
289
|
- spec/dashboard/tests_spec.rb
|
274
290
|
- spec/feature_rollout_spec.rb
|
275
291
|
- spec/feature_spec.rb
|
292
|
+
- spec/group_metric_spec.rb
|
276
293
|
- spec/group_spec.rb
|
277
294
|
- spec/metric_data/base_spec.rb
|
278
295
|
- spec/metric_data/total_spec.rb
|
296
|
+
- spec/metric_data/uid_generator_spec.rb
|
279
297
|
- spec/metric_data/unique_spec.rb
|
280
298
|
- spec/metric_spec.rb
|
281
299
|
- spec/pirate_spec.rb
|
@@ -312,8 +330,14 @@ specification_version: 4
|
|
312
330
|
summary: Blackbeard is a Redis backed metrics collection system with a Rack dashboard
|
313
331
|
test_files:
|
314
332
|
- spec/blackbeard_spec.rb
|
333
|
+
- spec/chart_spec.rb
|
334
|
+
- spec/chartable_spec.rb
|
335
|
+
- spec/cohort_data_spec.rb
|
336
|
+
- spec/cohort_metric_spec.rb
|
337
|
+
- spec/cohort_spec.rb
|
315
338
|
- spec/configuration_spec.rb
|
316
339
|
- spec/context_spec.rb
|
340
|
+
- spec/dashboard/cohorts_spec.rb
|
317
341
|
- spec/dashboard/features_spec.rb
|
318
342
|
- spec/dashboard/groups_spec.rb
|
319
343
|
- spec/dashboard/home_spec.rb
|
@@ -321,9 +345,11 @@ test_files:
|
|
321
345
|
- spec/dashboard/tests_spec.rb
|
322
346
|
- spec/feature_rollout_spec.rb
|
323
347
|
- spec/feature_spec.rb
|
348
|
+
- spec/group_metric_spec.rb
|
324
349
|
- spec/group_spec.rb
|
325
350
|
- spec/metric_data/base_spec.rb
|
326
351
|
- spec/metric_data/total_spec.rb
|
352
|
+
- spec/metric_data/uid_generator_spec.rb
|
327
353
|
- spec/metric_data/unique_spec.rb
|
328
354
|
- spec/metric_spec.rb
|
329
355
|
- spec/pirate_spec.rb
|
@@ -1,59 +0,0 @@
|
|
1
|
-
<div id="recent_hours_chart_div"></div>
|
2
|
-
<div id="recent_days_chart_div"></div>
|
3
|
-
|
4
|
-
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
5
|
-
<script type="text/javascript">
|
6
|
-
// Load the Visualization API and the piechart package.
|
7
|
-
google.load('visualization', '1.0', {'packages':['corechart']});
|
8
|
-
|
9
|
-
// Set a callback to run when the Google Visualization API is loaded.
|
10
|
-
google.setOnLoadCallback(drawHoursChart);
|
11
|
-
google.setOnLoadCallback(drawDaysChart);
|
12
|
-
|
13
|
-
// Callback that creates and populates a data table,
|
14
|
-
// instantiates the pie chart, passes in the data and
|
15
|
-
// draws it.
|
16
|
-
function drawHoursChart() {
|
17
|
-
|
18
|
-
// Create the data table.
|
19
|
-
var data = new google.visualization.DataTable();
|
20
|
-
data.addColumn('datetime', 'Hour');
|
21
|
-
<% metric_data.segments.each do |segment| %>
|
22
|
-
data.addColumn('number', '<%= segment %>');
|
23
|
-
<% end %>
|
24
|
-
data.addRows([
|
25
|
-
<%= metric_data.recent_hours.map{|h| js_metric_hour(metric_data.segments, h) }.join(',') %>
|
26
|
-
]);
|
27
|
-
|
28
|
-
// Set chart options
|
29
|
-
var options = {'title':'Last 24 Hours / <%= metric_data.group.nil? ? "All" : metric_data.group.name %>',
|
30
|
-
// 'width':900,
|
31
|
-
'height':300};
|
32
|
-
|
33
|
-
// Instantiate and draw our chart, passing in some options.
|
34
|
-
var chart = new google.visualization.LineChart(document.getElementById('recent_hours_chart_div'));
|
35
|
-
chart.draw(data, options);
|
36
|
-
}
|
37
|
-
|
38
|
-
function drawDaysChart() {
|
39
|
-
|
40
|
-
// Create the data table.
|
41
|
-
var data = new google.visualization.DataTable();
|
42
|
-
data.addColumn('date', 'Day');
|
43
|
-
<% metric_data.segments.each do |segment| %>
|
44
|
-
data.addColumn('number', '<%= segment %>');
|
45
|
-
<% end %>
|
46
|
-
data.addRows([
|
47
|
-
<%= metric_data.recent_days.map{|d| js_metric_date(metric_data.segments, d) }.join(',') %>
|
48
|
-
]);
|
49
|
-
|
50
|
-
// Set chart options
|
51
|
-
var options = {'title':'Last 28 Days / <%= metric_data.group.nil? ? "All" : metric_data.group.name %>',
|
52
|
-
// 'width':900,
|
53
|
-
'height':300};
|
54
|
-
|
55
|
-
// Instantiate and draw our chart, passing in some options.
|
56
|
-
var chart = new google.visualization.LineChart(document.getElementById('recent_days_chart_div'));
|
57
|
-
chart.draw(data, options);
|
58
|
-
}
|
59
|
-
</script>
|