corn 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/lib/corn.rb +1 -1
- data/lib/corn/rack/request_env.rb +15 -3
- data/lib/corn/rack/slow_request_profiler.rb +1 -1
- metadata +53 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7329740d9a00529d51463831c8ee047ec35531c5
|
4
|
+
data.tar.gz: 13f56bce0d38a336482b41ae50f6c2ec6f498628
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8a64caa0cfcdbeefac7fb4d9731fa3a507d8a54e23a7d99dcf7749078683b6863ac975df15079e7610ee752081b9742a3356e726a09e9d9d7cbdc13abbdd0065
|
7
|
+
data.tar.gz: e5c3b41d0a6534eed079c6af31bbee42f5db71f5bd5ba63f4c016672476b9e41dddd6e58331f13d17683f91e625c826291f5efc192ca45e86363cbc4acfc07a5
|
data/lib/corn.rb
CHANGED
@@ -14,11 +14,23 @@ module Corn
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def time
|
17
|
-
|
17
|
+
end_at - @env[:start_time]
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
21
|
-
|
20
|
+
def end_at
|
21
|
+
Time.now
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_report
|
25
|
+
name = File.join(@env[:http_host].to_s, @env[:path_info].to_s)
|
26
|
+
if @env[:query_string]
|
27
|
+
name = "#{name}?#{@env[:query_string]}"
|
28
|
+
end
|
29
|
+
{
|
30
|
+
'report[name]' => name,
|
31
|
+
'report[start_at]' => @env[:start_time].iso8601,
|
32
|
+
'report[end_at]' => end_at.iso8601
|
33
|
+
}
|
22
34
|
end
|
23
35
|
end
|
24
36
|
end
|
metadata
CHANGED
@@ -1,66 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: corn
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
- Xiao Li
|
8
|
-
autorequire:
|
6
|
+
authors:
|
7
|
+
- Xiao Li
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.4.5
|
25
|
-
prerelease: false
|
26
|
-
type: :runtime
|
11
|
+
|
12
|
+
date: 2014-06-20 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: sampling_prof
|
16
|
+
prerelease: false
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.4.5
|
22
|
+
type: :runtime
|
23
|
+
version_requirements: *id001
|
27
24
|
description: |
|
28
25
|
Corn collects your application's profiling data by sampling_prof gem, and submits the result to Corn server for analysis.
|
29
|
-
|
30
|
-
|
26
|
+
|
27
|
+
email:
|
28
|
+
- swing1979@gmail.com
|
31
29
|
executables: []
|
30
|
+
|
32
31
|
extensions: []
|
32
|
+
|
33
33
|
extra_rdoc_files: []
|
34
|
-
|
35
|
-
|
36
|
-
-
|
37
|
-
- lib/corn
|
38
|
-
- lib/corn/
|
39
|
-
- lib/corn/
|
40
|
-
- lib/corn/rack
|
41
|
-
- lib/corn/rack/
|
34
|
+
|
35
|
+
files:
|
36
|
+
- README.md
|
37
|
+
- lib/corn.rb
|
38
|
+
- lib/corn/config.rb
|
39
|
+
- lib/corn/post.rb
|
40
|
+
- lib/corn/rack.rb
|
41
|
+
- lib/corn/rack/request_env.rb
|
42
|
+
- lib/corn/rack/slow_request_profiler.rb
|
42
43
|
homepage: https://github.com/xli/corn
|
43
|
-
licenses:
|
44
|
-
- MIT
|
44
|
+
licenses:
|
45
|
+
- MIT
|
45
46
|
metadata: {}
|
46
|
-
|
47
|
+
|
48
|
+
post_install_message:
|
47
49
|
rdoc_options: []
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
50
|
+
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- &id002
|
56
|
+
- ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: "0"
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- *id002
|
60
62
|
requirements: []
|
61
|
-
|
63
|
+
|
64
|
+
rubyforge_project:
|
62
65
|
rubygems_version: 2.1.9
|
63
|
-
signing_key:
|
66
|
+
signing_key:
|
64
67
|
specification_version: 4
|
65
68
|
summary: Corn submits profiling data to Corn server.
|
66
69
|
test_files: []
|
70
|
+
|