airbrake-ruby 3.0.0.rc.5 → 3.0.0.rc.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/route_sender.rb +3 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/route_sender_spec.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04327c91a83c08259381847db21e87fd32b2099f
|
4
|
+
data.tar.gz: d56b1dc1533c561378ce71feea11b18c1d4319a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 935d9bb70c3fbafff9473ac4664dae2ec9135c51dfc46eaa312a0efd16c57c19013561f12669afbc7a425c7899a8b2c38df4c2674c0eb81e892baa8aa7394e28
|
7
|
+
data.tar.gz: 72e25c3198ebed9ed150a1bf1f8214fd54aa349b8e760c4b8f501643be5db2c885b4adae23fc0ee101197487ba0bf0c69222b1c97266e8011831d74a60f8b5c5
|
@@ -124,7 +124,9 @@ module Airbrake
|
|
124
124
|
def increment_stats(request_info, stat)
|
125
125
|
stat.count += 1
|
126
126
|
|
127
|
-
|
127
|
+
end_time = request_info[:end_time] || Time.new
|
128
|
+
ms = (end_time - request_info[:start_time]) * 1000
|
129
|
+
|
128
130
|
stat.sum += ms
|
129
131
|
stat.sumsq += ms * ms
|
130
132
|
|
data/spec/route_sender_spec.rb
CHANGED
@@ -74,11 +74,11 @@ RSpec.describe Airbrake::RouteSender do
|
|
74
74
|
body: %r|\A
|
75
75
|
{"routes":\[
|
76
76
|
{"method":"GET","route":"/foo","status_code":200,
|
77
|
-
"time":"2018-01-01T00:00:00\+00:00","count":1,"sum":
|
78
|
-
"sumsq":
|
77
|
+
"time":"2018-01-01T00:00:00\+00:00","count":1,"sum":1000.0,
|
78
|
+
"sumsq":1000000.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUR6AAAB"},
|
79
79
|
{"method":"GET","route":"/foo","status_code":200,
|
80
|
-
"time":"2018-01-01T00:01:00\+00:00","count":1,"sum":
|
81
|
-
"sumsq":
|
80
|
+
"time":"2018-01-01T00:01:00\+00:00","count":1,"sum":6000.0,
|
81
|
+
"sumsq":36000000.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUW7gAAB"}\]}
|
82
82
|
\z|x
|
83
83
|
)
|
84
84
|
).to have_been_made
|
@@ -105,11 +105,11 @@ RSpec.describe Airbrake::RouteSender do
|
|
105
105
|
body: %r|\A
|
106
106
|
{"routes":\[
|
107
107
|
{"method":"GET","route":"/foo","status_code":200,
|
108
|
-
"time":"2018-01-01T00:49:00\+00:00","count":1,"sum":
|
109
|
-
"sumsq":
|
108
|
+
"time":"2018-01-01T00:49:00\+00:00","count":1,"sum":60000.0,
|
109
|
+
"sumsq":3600000000.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUdqYAAB"},
|
110
110
|
{"method":"POST","route":"/foo","status_code":200,
|
111
|
-
"time":"2018-01-01T00:49:00\+00:00","count":1,"sum":
|
112
|
-
"sumsq":
|
111
|
+
"time":"2018-01-01T00:49:00\+00:00","count":1,"sum":60000.0,
|
112
|
+
"sumsq":3600000000.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUdqYAAB"}\]}
|
113
113
|
\z|x
|
114
114
|
)
|
115
115
|
).to have_been_made
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.rc.
|
4
|
+
version: 3.0.0.rc.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tdigest
|