mouth 0.8.0
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.
- data/.gitignore +7 -0
- data/Capfile +26 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +20 -0
- data/README.md +138 -0
- data/Rakefile +19 -0
- data/TODO +32 -0
- data/bin/mouth +77 -0
- data/bin/mouth-console +18 -0
- data/bin/mouth-endoscope +18 -0
- data/lib/mouth.rb +61 -0
- data/lib/mouth/dashboard.rb +25 -0
- data/lib/mouth/endoscope.rb +120 -0
- data/lib/mouth/endoscope/public/222222_256x240_icons_icons.png +0 -0
- data/lib/mouth/endoscope/public/application.css +464 -0
- data/lib/mouth/endoscope/public/application.js +938 -0
- data/lib/mouth/endoscope/public/backbone.js +1158 -0
- data/lib/mouth/endoscope/public/d3.js +4707 -0
- data/lib/mouth/endoscope/public/d3.time.js +687 -0
- data/lib/mouth/endoscope/public/jquery-ui-1.8.16.custom.min.js +177 -0
- data/lib/mouth/endoscope/public/jquery.js +4 -0
- data/lib/mouth/endoscope/public/json2.js +480 -0
- data/lib/mouth/endoscope/public/keymaster.js +163 -0
- data/lib/mouth/endoscope/public/linen.js +46 -0
- data/lib/mouth/endoscope/public/seven.css +68 -0
- data/lib/mouth/endoscope/public/seven.js +291 -0
- data/lib/mouth/endoscope/public/underscore.js +931 -0
- data/lib/mouth/endoscope/views/dashboard.erb +67 -0
- data/lib/mouth/graph.rb +58 -0
- data/lib/mouth/instrument.rb +56 -0
- data/lib/mouth/record.rb +72 -0
- data/lib/mouth/runner.rb +89 -0
- data/lib/mouth/sequence.rb +284 -0
- data/lib/mouth/source.rb +76 -0
- data/lib/mouth/sucker.rb +235 -0
- data/lib/mouth/version.rb +3 -0
- data/mouth.gemspec +28 -0
- data/test/sequence_test.rb +163 -0
- data/test/sucker_test.rb +55 -0
- data/test/test_helper.rb +5 -0
- metadata +167 -0
data/test/sucker_test.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
$LOAD_PATH.unshift 'test'
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
require 'mouth/sucker'
|
5
|
+
|
6
|
+
class SuckerTest < Test::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_storing_count
|
11
|
+
r = Mouth::Sucker.new
|
12
|
+
|
13
|
+
r.store!("happening:3|c")
|
14
|
+
|
15
|
+
assert_equal ({"default.happening" => 3}), r.counters.values.first
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_storing_count_with_sampling
|
19
|
+
r = Mouth::Sucker.new
|
20
|
+
|
21
|
+
r.store!("happening:3|c|@0.1")
|
22
|
+
|
23
|
+
assert_equal ({"default.happening" => 30}), r.counters.values.first
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_storing_count_with_zero_sampling
|
27
|
+
r = Mouth::Sucker.new
|
28
|
+
|
29
|
+
r.store!("happening:3|c|@0.0")
|
30
|
+
|
31
|
+
assert_equal ({"default.happening" => 3}), r.counters.values.first
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_storing_count_with_big_sampling
|
35
|
+
r = Mouth::Sucker.new
|
36
|
+
|
37
|
+
r.store!("happening:3|c|@2.0")
|
38
|
+
|
39
|
+
assert_equal ({"default.happening" => 3}), r.counters.values.first
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_storing_timer
|
43
|
+
r = Mouth::Sucker.new
|
44
|
+
|
45
|
+
r.store!("happening:3.7|ms")
|
46
|
+
assert_equal ({"default.happening" => [3.7]}), r.timers.values.first
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_different_types_of_characters
|
50
|
+
r = Mouth::Sucker.new
|
51
|
+
|
52
|
+
r.store!("abc/123.hello/789 foobar.baz:3.7|ms")
|
53
|
+
assert_equal ({"abc-123.hello/789_foobar-baz" => [3.7]}), r.timers.values.first
|
54
|
+
end
|
55
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mouth
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jonathan Novak
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-30 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: em-mongo
|
16
|
+
requirement: &70094097164760 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.4.2
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70094097164760
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: mongo
|
27
|
+
requirement: &70094097164260 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.6'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70094097164260
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: bson_ext
|
38
|
+
requirement: &70094097163800 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.6'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70094097163800
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: eventmachine
|
49
|
+
requirement: &70094097163340 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.12.10
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70094097163340
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: vegas
|
60
|
+
requirement: &70094097162880 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 0.1.8
|
66
|
+
type: :runtime
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70094097162880
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sinatra
|
71
|
+
requirement: &70094097162420 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 1.3.1
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *70094097162420
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: yajl-ruby
|
82
|
+
requirement: &70094097161960 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 1.1.0
|
88
|
+
type: :runtime
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70094097161960
|
91
|
+
description: Ruby Daemon collects statistics via UDP packets, stores them in Mongo,
|
92
|
+
and then views them via a user friendly Sintra app.
|
93
|
+
email: jnovak@gmail.com
|
94
|
+
executables:
|
95
|
+
- mouth
|
96
|
+
- mouth-endoscope
|
97
|
+
extensions: []
|
98
|
+
extra_rdoc_files: []
|
99
|
+
files:
|
100
|
+
- .gitignore
|
101
|
+
- Capfile
|
102
|
+
- Gemfile
|
103
|
+
- MIT-LICENSE
|
104
|
+
- README.md
|
105
|
+
- Rakefile
|
106
|
+
- TODO
|
107
|
+
- bin/mouth
|
108
|
+
- bin/mouth-console
|
109
|
+
- bin/mouth-endoscope
|
110
|
+
- lib/mouth.rb
|
111
|
+
- lib/mouth/dashboard.rb
|
112
|
+
- lib/mouth/endoscope.rb
|
113
|
+
- lib/mouth/endoscope/public/222222_256x240_icons_icons.png
|
114
|
+
- lib/mouth/endoscope/public/application.css
|
115
|
+
- lib/mouth/endoscope/public/application.js
|
116
|
+
- lib/mouth/endoscope/public/backbone.js
|
117
|
+
- lib/mouth/endoscope/public/d3.js
|
118
|
+
- lib/mouth/endoscope/public/d3.time.js
|
119
|
+
- lib/mouth/endoscope/public/jquery-ui-1.8.16.custom.min.js
|
120
|
+
- lib/mouth/endoscope/public/jquery.js
|
121
|
+
- lib/mouth/endoscope/public/json2.js
|
122
|
+
- lib/mouth/endoscope/public/keymaster.js
|
123
|
+
- lib/mouth/endoscope/public/linen.js
|
124
|
+
- lib/mouth/endoscope/public/seven.css
|
125
|
+
- lib/mouth/endoscope/public/seven.js
|
126
|
+
- lib/mouth/endoscope/public/underscore.js
|
127
|
+
- lib/mouth/endoscope/views/dashboard.erb
|
128
|
+
- lib/mouth/graph.rb
|
129
|
+
- lib/mouth/instrument.rb
|
130
|
+
- lib/mouth/record.rb
|
131
|
+
- lib/mouth/runner.rb
|
132
|
+
- lib/mouth/sequence.rb
|
133
|
+
- lib/mouth/source.rb
|
134
|
+
- lib/mouth/sucker.rb
|
135
|
+
- lib/mouth/version.rb
|
136
|
+
- mouth.gemspec
|
137
|
+
- test/sequence_test.rb
|
138
|
+
- test/sucker_test.rb
|
139
|
+
- test/test_helper.rb
|
140
|
+
homepage: http://github.com/cypriss/mouth
|
141
|
+
licenses: []
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
148
|
+
requirements:
|
149
|
+
- - ! '>='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 1.9.2
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 1.3.4
|
158
|
+
requirements: []
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 1.8.17
|
161
|
+
signing_key:
|
162
|
+
specification_version: 3
|
163
|
+
summary: Collect and view stats in real time.
|
164
|
+
test_files:
|
165
|
+
- test/sequence_test.rb
|
166
|
+
- test/sucker_test.rb
|
167
|
+
- test/test_helper.rb
|