statlysis 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Guardfile +14 -0
- data/README.markdown +77 -27
- data/Rakefile +1 -1
- data/lib/statlysis.rb +59 -101
- data/lib/statlysis/clock.rb +3 -3
- data/lib/statlysis/common.rb +4 -16
- data/lib/statlysis/configuration.rb +97 -2
- data/lib/statlysis/constants.rb +10 -0
- data/lib/statlysis/cron.rb +40 -42
- data/lib/statlysis/cron/count.rb +16 -58
- data/lib/statlysis/cron/count/dimensions.rb +7 -0
- data/lib/statlysis/cron/count/timely.rb +63 -0
- data/lib/statlysis/cron/top.rb +4 -104
- data/lib/statlysis/cron/top/hotest_items.rb +47 -0
- data/lib/statlysis/cron/top/lastest_visits.rb +53 -0
- data/lib/statlysis/cron_set.rb +26 -0
- data/lib/statlysis/dataset.rb +6 -0
- data/lib/statlysis/javascript/count.rb +3 -3
- data/lib/statlysis/multiple_dataset.rb +69 -0
- data/lib/statlysis/multiple_dataset/active_record.rb +36 -0
- data/lib/statlysis/multiple_dataset/mongoid.rb +54 -0
- data/lib/statlysis/rake.rb +6 -5
- data/lib/statlysis/similar.rb +11 -11
- data/lib/statlysis/timeseries.rb +12 -9
- data/lib/statlysis/utils.rb +40 -0
- data/statlysis.gemspec +13 -3
- data/test/config/database.yml +9 -0
- data/test/config/mongoid.yml +36 -0
- data/test/data/.gitkeep +0 -0
- data/test/data/code_gists_20130724.csv +1459 -0
- data/test/helper.rb +41 -3
- data/test/migrate/1_active_record.rb +8 -0
- data/test/models/.gitkeep +0 -0
- data/test/models/code_gist.rb +5 -0
- data/test/models/eoe_log.rb +53 -0
- data/test/test_daily_count.rb +22 -0
- data/test/test_mapreduce.rb +0 -13
- data/test/test_single_log_in_multiple_collections.rb +22 -0
- data/test/test_statlysis.rb +5 -50
- data/test/test_timeseries.rb +46 -0
- metadata +133 -12
- data/Gemfile.lock +0 -110
- data/LICENSE.txt +0 -20
- data/test/models/company.rb +0 -12
- data/test/models/employee.rb +0 -14
data/Gemfile.lock
DELETED
@@ -1,110 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
statlysis (0.0.1)
|
5
|
-
activerecord
|
6
|
-
activerecord_idnamecache
|
7
|
-
activesupport
|
8
|
-
mongoid
|
9
|
-
mysql2
|
10
|
-
only_one_rake
|
11
|
-
rails
|
12
|
-
rake
|
13
|
-
sequel
|
14
|
-
|
15
|
-
GEM
|
16
|
-
remote: http://rubygems.org/
|
17
|
-
specs:
|
18
|
-
actionmailer (3.2.13)
|
19
|
-
actionpack (= 3.2.13)
|
20
|
-
mail (~> 2.5.3)
|
21
|
-
actionpack (3.2.13)
|
22
|
-
activemodel (= 3.2.13)
|
23
|
-
activesupport (= 3.2.13)
|
24
|
-
builder (~> 3.0.0)
|
25
|
-
erubis (~> 2.7.0)
|
26
|
-
journey (~> 1.0.4)
|
27
|
-
rack (~> 1.4.5)
|
28
|
-
rack-cache (~> 1.2)
|
29
|
-
rack-test (~> 0.6.1)
|
30
|
-
sprockets (~> 2.2.1)
|
31
|
-
activemodel (3.2.13)
|
32
|
-
activesupport (= 3.2.13)
|
33
|
-
builder (~> 3.0.0)
|
34
|
-
activerecord (3.2.13)
|
35
|
-
activemodel (= 3.2.13)
|
36
|
-
activesupport (= 3.2.13)
|
37
|
-
arel (~> 3.0.2)
|
38
|
-
tzinfo (~> 0.3.29)
|
39
|
-
activerecord_idnamecache (0.1)
|
40
|
-
activeresource (3.2.13)
|
41
|
-
activemodel (= 3.2.13)
|
42
|
-
activesupport (= 3.2.13)
|
43
|
-
activesupport (3.2.13)
|
44
|
-
i18n (= 0.6.1)
|
45
|
-
multi_json (~> 1.0)
|
46
|
-
arel (3.0.2)
|
47
|
-
builder (3.0.4)
|
48
|
-
erubis (2.7.0)
|
49
|
-
hike (1.2.3)
|
50
|
-
i18n (0.6.1)
|
51
|
-
journey (1.0.4)
|
52
|
-
json (1.8.0)
|
53
|
-
mail (2.5.4)
|
54
|
-
mime-types (~> 1.16)
|
55
|
-
treetop (~> 1.4.8)
|
56
|
-
mime-types (1.23)
|
57
|
-
mongoid (3.1.4)
|
58
|
-
activemodel (~> 3.2)
|
59
|
-
moped (~> 1.4)
|
60
|
-
origin (~> 1.0)
|
61
|
-
tzinfo (~> 0.3.22)
|
62
|
-
moped (1.5.0)
|
63
|
-
multi_json (1.7.7)
|
64
|
-
mysql2 (0.3.11)
|
65
|
-
only_one_rake (0.0.4)
|
66
|
-
origin (1.1.0)
|
67
|
-
polyglot (0.3.3)
|
68
|
-
rack (1.4.5)
|
69
|
-
rack-cache (1.2)
|
70
|
-
rack (>= 0.4)
|
71
|
-
rack-ssl (1.3.3)
|
72
|
-
rack
|
73
|
-
rack-test (0.6.2)
|
74
|
-
rack (>= 1.0)
|
75
|
-
rails (3.2.13)
|
76
|
-
actionmailer (= 3.2.13)
|
77
|
-
actionpack (= 3.2.13)
|
78
|
-
activerecord (= 3.2.13)
|
79
|
-
activeresource (= 3.2.13)
|
80
|
-
activesupport (= 3.2.13)
|
81
|
-
bundler (~> 1.0)
|
82
|
-
railties (= 3.2.13)
|
83
|
-
railties (3.2.13)
|
84
|
-
actionpack (= 3.2.13)
|
85
|
-
activesupport (= 3.2.13)
|
86
|
-
rack-ssl (~> 1.3.2)
|
87
|
-
rake (>= 0.8.7)
|
88
|
-
rdoc (~> 3.4)
|
89
|
-
thor (>= 0.14.6, < 2.0)
|
90
|
-
rake (10.1.0)
|
91
|
-
rdoc (3.12.2)
|
92
|
-
json (~> 1.4)
|
93
|
-
sequel (4.0.0)
|
94
|
-
sprockets (2.2.2)
|
95
|
-
hike (~> 1.2)
|
96
|
-
multi_json (~> 1.0)
|
97
|
-
rack (~> 1.0)
|
98
|
-
tilt (~> 1.1, != 1.3.0)
|
99
|
-
thor (0.18.1)
|
100
|
-
tilt (1.4.1)
|
101
|
-
treetop (1.4.14)
|
102
|
-
polyglot
|
103
|
-
polyglot (>= 0.3.1)
|
104
|
-
tzinfo (0.3.37)
|
105
|
-
|
106
|
-
PLATFORMS
|
107
|
-
ruby
|
108
|
-
|
109
|
-
DEPENDENCIES
|
110
|
-
statlysis!
|
data/LICENSE.txt
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 David Chen at eoe.cn
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/test/models/company.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# copied from git://github.com/joe1chen/mongoid-mapreduce.git
|
2
|
-
|
3
|
-
class Company
|
4
|
-
include Mongoid::Document
|
5
|
-
|
6
|
-
field :name, :type => String
|
7
|
-
field :market, :type => String
|
8
|
-
field :shares, :type => Integer
|
9
|
-
field :quote, :type => Float
|
10
|
-
|
11
|
-
has_many :employees
|
12
|
-
end
|
data/test/models/employee.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# copied from git://github.com/joe1chen/mongoid-mapreduce.git
|
2
|
-
|
3
|
-
class Employee
|
4
|
-
include Mongoid::Document
|
5
|
-
|
6
|
-
field :name
|
7
|
-
field :division
|
8
|
-
field :awards, :type => Integer
|
9
|
-
field :age, :type => Integer
|
10
|
-
field :rooms, :type => Array
|
11
|
-
field :active, :type => Boolean
|
12
|
-
|
13
|
-
belongs_to :company
|
14
|
-
end
|