fnordmetric 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/VERSION +1 -1
- data/doc/preview1.png +0 -0
- data/doc/preview2.png +0 -0
- data/doc/ulm_stats.rb +622 -0
- data/doc/version +1 -0
- data/fnordmetric.gemspec +16 -38
- data/haml/app.haml +12 -5
- data/lib/fnordmetric.rb +3 -0
- data/lib/fnordmetric/app.rb +19 -10
- data/lib/fnordmetric/bars_widget.rb +26 -0
- data/lib/fnordmetric/context.rb +3 -3
- data/lib/fnordmetric/gauge.rb +20 -0
- data/lib/fnordmetric/gauge_calculations.rb +28 -4
- data/lib/fnordmetric/gauge_modifiers.rb +39 -6
- data/lib/fnordmetric/logger.rb +19 -0
- data/lib/fnordmetric/numbers_widget.rb +5 -15
- data/lib/fnordmetric/pie_widget.rb +23 -0
- data/lib/fnordmetric/standalone.rb +1 -1
- data/lib/fnordmetric/timeline_widget.rb +16 -23
- data/lib/fnordmetric/toplist_widget.rb +25 -0
- data/lib/fnordmetric/widget.rb +3 -3
- data/pub/{fnordmetric/fnordmetric.css → fnordmetric.css} +46 -36
- data/pub/fnordmetric.js +1069 -0
- data/pub/loader.gif +0 -0
- data/pub/{highcharts → vendor}/highcharts.js +0 -0
- data/pub/{jquery-1.6.1.min.js → vendor/jquery-1.6.1.min.js} +0 -0
- data/readme.rdoc +228 -311
- data/spec/app_spec.rb +63 -3
- data/spec/gauge_modifiers_spec.rb +157 -2
- data/spec/gauge_spec.rb +143 -12
- data/spec/widget_spec.rb +18 -18
- metadata +33 -58
- data/.document +0 -5
- data/_spec/app_spec.rb +0 -178
- data/_spec/cache_spec.rb +0 -53
- data/_spec/combine_metric_spec.rb +0 -19
- data/_spec/core_spec.rb +0 -50
- data/_spec/count_metric_spec.rb +0 -32
- data/_spec/dashboard_spec.rb +0 -67
- data/_spec/event_spec.rb +0 -46
- data/_spec/metric_spec.rb +0 -118
- data/_spec/report_spec.rb +0 -87
- data/_spec/sum_metric_spec.rb +0 -33
- data/_spec/widget_spec.rb +0 -107
- data/doc/example_server.rb +0 -56
- data/doc/import_dump.rb +0 -26
- data/pub/fnordmetric/fnordmetric.js +0 -543
- data/pub/fnordmetric/widget_numbers.js +0 -71
- data/pub/fnordmetric/widget_timeline.css +0 -0
- data/pub/fnordmetric/widget_timeline.js +0 -110
- data/pub/highcharts/adapters/mootools-adapter.js +0 -12
- data/pub/highcharts/adapters/mootools-adapter.src.js +0 -243
- data/pub/highcharts/adapters/prototype-adapter.js +0 -14
- data/pub/highcharts/adapters/prototype-adapter.src.js +0 -284
- data/pub/highcharts/highcharts.src.js +0 -11103
- data/pub/highcharts/modules/exporting.js +0 -22
- data/pub/highcharts/modules/exporting.src.js +0 -703
- data/pub/highcharts/themes/dark-blue.js +0 -268
- data/pub/highcharts/themes/dark-green.js +0 -268
- data/pub/highcharts/themes/gray.js +0 -262
- data/pub/highcharts/themes/grid.js +0 -97
- data/pub/raphael-min.js +0 -8
- data/pub/raphael-utils.js +0 -221
- data/ulm_stats.rb +0 -198
data/ulm_stats.rb
DELETED
@@ -1,198 +0,0 @@
|
|
1
|
-
$: << ::File.expand_path("../../fnordmetric/lib/", __FILE__)
|
2
|
-
require "fnordmetric"
|
3
|
-
|
4
|
-
# todos: old stylesheet, numbers widget, dump-to-file(+reimport)
|
5
|
-
FnordMetric.namespace :ulmstats do
|
6
|
-
|
7
|
-
# user activity
|
8
|
-
gauge :skip_votes, :tick => 1.day.to_i
|
9
|
-
gauge :yes_votes, :tick => 1.day.to_i
|
10
|
-
gauge :maybe_votes, :tick => 1.day.to_i
|
11
|
-
|
12
|
-
event(:skip_vote){ incr :skip_votes }
|
13
|
-
event(:action_skip){ incr :skip_votes }
|
14
|
-
event(:yes_vote){ incr :yes_votes }
|
15
|
-
event(:action_yes){ incr :yes_votes }
|
16
|
-
event(:maybe_vote){ incr :maybe_votes }
|
17
|
-
event(:action_maybe){ incr :maybe_votes }
|
18
|
-
|
19
|
-
widget 'UserActivity', {
|
20
|
-
:title => "Yes/No/Skip-Votes",
|
21
|
-
:type => :timeline,
|
22
|
-
:include_current => false,
|
23
|
-
:gauges => [:skip_votes, :yes_votes, :maybe_votes]
|
24
|
-
}
|
25
|
-
|
26
|
-
widget 'UserActivity', {
|
27
|
-
:title => "Yes/No/Skip Numbers",
|
28
|
-
:type => :numbers,
|
29
|
-
:gauges => [:skip_votes, :yes_votes, :maybe_votes]
|
30
|
-
}
|
31
|
-
|
32
|
-
|
33
|
-
gauge :messages_sent, :tick => 1.day.to_i
|
34
|
-
gauge :messages_read, :tick => 1.day.to_i
|
35
|
-
gauge :winks_sent, :tick => 1.day.to_i
|
36
|
-
|
37
|
-
event(:action_wink){ incr :winks_sent }
|
38
|
-
event(:wink_sent){ incr :winks_sent }
|
39
|
-
event(:message_sent){ incr :messages_sent }
|
40
|
-
event(:message_read){ incr :messages_read }
|
41
|
-
|
42
|
-
widget 'UserActivity', {
|
43
|
-
:title => "Messages sent/read",
|
44
|
-
:type => :timeline,
|
45
|
-
:include_current => false,
|
46
|
-
:gauges => [:messages_sent, :messages_read]
|
47
|
-
}
|
48
|
-
|
49
|
-
widget 'UserActivity', {
|
50
|
-
:title => "Winks sent",
|
51
|
-
:type => :timeline,
|
52
|
-
:include_current => false,
|
53
|
-
:gauges => [:winks_sent]
|
54
|
-
}
|
55
|
-
|
56
|
-
widget 'UserActivity', {
|
57
|
-
:title => "Messages sent+read/Winks Numbers",
|
58
|
-
:type => :numbers,
|
59
|
-
:gauges => [:messages_sent, :messages_read, :winks_sent]
|
60
|
-
}
|
61
|
-
|
62
|
-
gauge :events_per_minute, :tick => 60
|
63
|
-
gauge :uniques_daily, :tick => 1.day.to_i, :unique => true
|
64
|
-
|
65
|
-
event :"*" do
|
66
|
-
incr :events_per_minute
|
67
|
-
incr :uniques_daily
|
68
|
-
end
|
69
|
-
|
70
|
-
widget 'TrafficChannels', {
|
71
|
-
:title => "Daily Uniques",
|
72
|
-
:type => :timeline,
|
73
|
-
:width => 70,
|
74
|
-
:gauges => :uniques_daily
|
75
|
-
}
|
76
|
-
|
77
|
-
widget 'TrafficChannels', {
|
78
|
-
:title => "Events per Minute",
|
79
|
-
:type => :timeline,
|
80
|
-
:width => 30,
|
81
|
-
:gauges => :events_per_minute
|
82
|
-
}
|
83
|
-
|
84
|
-
#widget 'TrafficChannels', {
|
85
|
-
# :title => "Daily uniques / EPM",
|
86
|
-
# :type => :numbers,
|
87
|
-
# :gauges => [:uniques_daily, :events_per_minute]
|
88
|
-
#}
|
89
|
-
|
90
|
-
gauge :mails_sent, :tick => 1.day.to_i
|
91
|
-
gauge :mails_clicked, :tick => 1.day.to_i
|
92
|
-
|
93
|
-
event(:mail_sent){ incr :mails_sent }
|
94
|
-
event(:mail_clicked){ incr :mails_clicked }
|
95
|
-
|
96
|
-
widget 'TrafficChannels', {
|
97
|
-
:title => "Mails sent/read",
|
98
|
-
:type => :timeline,
|
99
|
-
:gauges => [:mails_sent, :mails_clicked]
|
100
|
-
}
|
101
|
-
|
102
|
-
widget 'TrafficChannels', {
|
103
|
-
:title => "Mail sent/read Numbers",
|
104
|
-
:type => :numbers,
|
105
|
-
:gauges => [:mails_sent, :mails_clicked]
|
106
|
-
}
|
107
|
-
|
108
|
-
gauge :app_requests_sent, :tick => 1.day.to_i
|
109
|
-
gauge :app_requests_clicked, :tick => 1.day.to_i
|
110
|
-
|
111
|
-
event(:app_request_sent){ incr :app_requests_sent }
|
112
|
-
event(:app_request_click){ incr :app_requests_clicked }
|
113
|
-
|
114
|
-
widget 'TrafficChannels', {
|
115
|
-
:title => "App-Requests sent/clicked",
|
116
|
-
:type => :timeline,
|
117
|
-
:gauges => [:app_requests_sent, :app_requests_clicked]
|
118
|
-
}
|
119
|
-
|
120
|
-
widget 'TrafficChannels', {
|
121
|
-
:title => "App-Requests sent/clicked Numbers",
|
122
|
-
:type => :numbers,
|
123
|
-
:gauges => [:app_requests_sent, :app_requests_clicked]
|
124
|
-
}
|
125
|
-
|
126
|
-
gauge :wall_posts_sent, :tick => 1.day.to_i
|
127
|
-
gauge :wall_posts_clicked, :tick => 1.day.to_i
|
128
|
-
|
129
|
-
event(:wallpost_sent){ incr :wall_posts_sent }
|
130
|
-
event(:wallpost_click){ incr :wall_posts_clicked }
|
131
|
-
|
132
|
-
widget 'TrafficChannels', {
|
133
|
-
:title => "Wall-Posts sent/clicked",
|
134
|
-
:type => :timeline,
|
135
|
-
:gauges => [:wall_posts_sent, :wall_posts_clicked]
|
136
|
-
}
|
137
|
-
|
138
|
-
widget 'TrafficChannels', {
|
139
|
-
:title => "Wall-Posts sent/clicked Numbers",
|
140
|
-
:type => :numbers,
|
141
|
-
:gauges => [:wall_posts_sent, :wall_posts_clicked]
|
142
|
-
}
|
143
|
-
|
144
|
-
|
145
|
-
gauge :rockyou1_ppis, :tick => 1.day.to_i
|
146
|
-
gauge :rockyou1_requests, :tick => 1.day.to_i
|
147
|
-
gauge :rockyou1_refs, :tick => 1.day.to_i
|
148
|
-
|
149
|
-
event :campaign_install do
|
150
|
-
if %w(ry201112a ry201112b).include?(data[:campaign_key])
|
151
|
-
incr :rockyou1_ppis
|
152
|
-
end
|
153
|
-
if %w(ry201112_ref).include?(data[:campaign_key])
|
154
|
-
incr :rockyou1_refs
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
event :app_request_sent do
|
159
|
-
if %w(ry201112a ry201112b ry201112_ref).include?(data[:campaign_key])
|
160
|
-
incr :rockyou1_requests
|
161
|
-
end
|
162
|
-
end
|
163
|
-
|
164
|
-
widget 'Campaigns', {
|
165
|
-
:title => "RockYou (1) - Installs via PPI",
|
166
|
-
:type => :timeline,
|
167
|
-
:include_current => false,
|
168
|
-
:gauges => [:rockyou1_ppis]
|
169
|
-
}
|
170
|
-
|
171
|
-
widget 'Campaigns', {
|
172
|
-
:title => "RockYou (1) - Installs via Referral",
|
173
|
-
:gauges => [:rockyou1_refs],
|
174
|
-
:include_current => false,
|
175
|
-
:type => :timeline
|
176
|
-
}
|
177
|
-
|
178
|
-
widget 'Campaigns', {
|
179
|
-
:title => "RockYou (1) - AppRequests sent",
|
180
|
-
:gauges => [:rockyou1_requests],
|
181
|
-
:include_current => false,
|
182
|
-
:type => :timeline
|
183
|
-
}
|
184
|
-
|
185
|
-
widget 'Campaigns', {
|
186
|
-
:title => "RockYou (1) - PPI vs. Requests vs. Refs",
|
187
|
-
:gauges => [:rockyou1_requests, :rockyou1_ppis, :rockyou1_refs],
|
188
|
-
:include_current => false,
|
189
|
-
:type => :timeline
|
190
|
-
}
|
191
|
-
|
192
|
-
end
|
193
|
-
|
194
|
-
#task :setup do
|
195
|
-
# @fm_opts = {:web_interface => ["0.0.0.0", "2323"]} if ENV['DEV']
|
196
|
-
#end
|
197
|
-
|
198
|
-
FnordMetric.standalone
|