x_runtime 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -2
- data/VERSION +1 -1
- data/lib/x_runtime/middleware.rb +1 -1
- data/x_runtime.gemspec +2 -2
- metadata +3 -3
data/README.markdown
CHANGED
@@ -7,7 +7,7 @@ XRuntime是一个Rack的middleware,配合Redis用来分析Http Server每个URI
|
|
7
7
|
* redis-server版本>2.6.x
|
8
8
|
* redis(ruby gem)>3.0.1
|
9
9
|
|
10
|
-
在Redis中,对每一个
|
10
|
+
在Redis中,对每一个REQUEST_PATH记录了以下信息:
|
11
11
|
* 请求总数
|
12
12
|
* 总共请求时间
|
13
13
|
* 最近一次请求时间
|
@@ -19,7 +19,7 @@ XRuntime是一个Rack的middleware,配合Redis用来分析Http Server每个URI
|
|
19
19
|
## Portal
|
20
20
|
|
21
21
|
可以访问Http Server的这个URL来实时查看当前记录的请求:[/xruntime](/xruntime)
|
22
|
-
这个页面是按照每个
|
22
|
+
这个页面是按照每个REQUEST_PATH数次执行后的平均时间来排序的。
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
data/lib/x_runtime/middleware.rb
CHANGED
@@ -29,7 +29,7 @@ module XRuntime
|
|
29
29
|
status, headers, body = @app.call(env)
|
30
30
|
request_time = (Time.now - start_time).to_f*1000
|
31
31
|
if request_time >= @threshold
|
32
|
-
logredis(request_time, env['
|
32
|
+
logredis(request_time, env['REQUEST_PATH']) rescue nil
|
33
33
|
end
|
34
34
|
|
35
35
|
[status, headers, body]
|
data/x_runtime.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "x_runtime"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.8.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["\u{5d14}\u{5ce5}"]
|
12
|
-
s.date = "2012-08-
|
12
|
+
s.date = "2012-08-25"
|
13
13
|
s.description = "\u{7531}\u{4e8e}\u{4f7f}\u{7528}\u{5230}Redis\u{7684}lua script,\u{6240}\u{4ee5}\u{9700}\u{8981}\u{4f60}\u{7684}Redis\u{670d}\u{52a1}\u{652f}\u{6301},redis-server\u{7248}\u{672c}>2.6.x,redis(ruby gem)>3.0.1."
|
14
14
|
s.email = "zheng.cuizh@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: x_runtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -135,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
segments:
|
137
137
|
- 0
|
138
|
-
hash:
|
138
|
+
hash: -3201334121123236605
|
139
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
140
|
none: false
|
141
141
|
requirements:
|