protobuf 2.7.1 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/protobuf/rpc/server.rb +1 -0
- data/lib/protobuf/rpc/stat.rb +14 -5
- data/lib/protobuf/version.rb +1 -1
- metadata +30 -30
data/lib/protobuf/rpc/server.rb
CHANGED
data/lib/protobuf/rpc/stat.rb
CHANGED
@@ -22,6 +22,10 @@ module Protobuf
|
|
22
22
|
@client || nil
|
23
23
|
end
|
24
24
|
|
25
|
+
def elapsed_time
|
26
|
+
(start_time && end_time ? "#{(end_time - start_time).round(4)}s" : nil)
|
27
|
+
end
|
28
|
+
|
25
29
|
def method_name
|
26
30
|
@method_name ||= @dispatcher.try(:service).try(:rpc)
|
27
31
|
end
|
@@ -39,7 +43,7 @@ module Protobuf
|
|
39
43
|
end
|
40
44
|
|
41
45
|
def sizes
|
42
|
-
"#{@request_size || 0}B/#{@response_size || 0}B"
|
46
|
+
"#{@request_size || 0}B/#{@response_size || 0}B" if stopped?
|
43
47
|
end
|
44
48
|
|
45
49
|
def start
|
@@ -51,12 +55,12 @@ module Protobuf
|
|
51
55
|
@end_time ||= Time.now
|
52
56
|
end
|
53
57
|
|
54
|
-
def
|
55
|
-
|
58
|
+
def stopped?
|
59
|
+
! end_time.nil?
|
56
60
|
end
|
57
61
|
|
58
|
-
def
|
59
|
-
|
62
|
+
def rpc
|
63
|
+
service && method_name ? "#{service}##{method_name}" : nil
|
60
64
|
end
|
61
65
|
|
62
66
|
def server?
|
@@ -71,12 +75,17 @@ module Protobuf
|
|
71
75
|
[
|
72
76
|
server? ? "[SRV]" : "[CLT]",
|
73
77
|
server? ? client : server,
|
78
|
+
trace_id,
|
74
79
|
rpc,
|
75
80
|
elapsed_time,
|
76
81
|
sizes
|
77
82
|
].compact.join(' - ')
|
78
83
|
end
|
79
84
|
|
85
|
+
def trace_id
|
86
|
+
Thread.current.object_id.to_s(16)
|
87
|
+
end
|
88
|
+
|
80
89
|
end
|
81
90
|
end
|
82
91
|
end
|
data/lib/protobuf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-19 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
17
|
-
requirement: &
|
17
|
+
requirement: &2152135800 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2152135800
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: ffi
|
28
|
-
requirement: &
|
28
|
+
requirement: &2152134500 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2152134500
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: multi_json
|
39
|
-
requirement: &
|
39
|
+
requirement: &2152133000 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2152133000
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: thor
|
50
|
-
requirement: &
|
50
|
+
requirement: &2152131280 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2152131280
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: eventmachine
|
61
|
-
requirement: &
|
61
|
+
requirement: &2152129060 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2152129060
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: ffi-rzmq
|
72
|
-
requirement: &
|
72
|
+
requirement: &2152127300 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2152127300
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: pry
|
83
|
-
requirement: &
|
83
|
+
requirement: &2152112220 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *2152112220
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: pry-nav
|
94
|
-
requirement: &
|
94
|
+
requirement: &2152110260 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *2152110260
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rake
|
105
|
-
requirement: &
|
105
|
+
requirement: &2152107060 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *2152107060
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: rake-compiler
|
116
|
-
requirement: &
|
116
|
+
requirement: &2152104820 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *2152104820
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec
|
127
|
-
requirement: &
|
127
|
+
requirement: &2152102000 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ! '>='
|
@@ -132,10 +132,10 @@ dependencies:
|
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *2152102000
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: simplecov
|
138
|
-
requirement: &
|
138
|
+
requirement: &2152100180 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ! '>='
|
@@ -143,10 +143,10 @@ dependencies:
|
|
143
143
|
version: '0'
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
|
-
version_requirements: *
|
146
|
+
version_requirements: *2152100180
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
148
|
name: yard
|
149
|
-
requirement: &
|
149
|
+
requirement: &2152097180 !ruby/object:Gem::Requirement
|
150
150
|
none: false
|
151
151
|
requirements:
|
152
152
|
- - ! '>='
|
@@ -154,7 +154,7 @@ dependencies:
|
|
154
154
|
version: '0'
|
155
155
|
type: :development
|
156
156
|
prerelease: false
|
157
|
-
version_requirements: *
|
157
|
+
version_requirements: *2152097180
|
158
158
|
description: Google Protocol Buffers v2.4.1 Serialization and RPC implementation for
|
159
159
|
Ruby.
|
160
160
|
email:
|
@@ -434,7 +434,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
434
434
|
version: '0'
|
435
435
|
segments:
|
436
436
|
- 0
|
437
|
-
hash:
|
437
|
+
hash: 1287812807284691989
|
438
438
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
439
439
|
none: false
|
440
440
|
requirements:
|
@@ -443,7 +443,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
443
443
|
version: '0'
|
444
444
|
segments:
|
445
445
|
- 0
|
446
|
-
hash:
|
446
|
+
hash: 1287812807284691989
|
447
447
|
requirements: []
|
448
448
|
rubyforge_project:
|
449
449
|
rubygems_version: 1.8.15
|