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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84d9bd8df1233ea2c15f4f299e88724431188ad4
4
- data.tar.gz: 30e834bbd33cb36abcd8703b2eaa8b9c3035b6b9
3
+ metadata.gz: 04327c91a83c08259381847db21e87fd32b2099f
4
+ data.tar.gz: d56b1dc1533c561378ce71feea11b18c1d4319a9
5
5
  SHA512:
6
- metadata.gz: 6a6c6bedcb66906b4b8cbe2d3f52b1d2f610e4ef061c5533be301ad01cc9ef12e2f39a58b9758a34b081d74941ae898053cd4cbd44fd164730525f34d7d7957f
7
- data.tar.gz: 78b0135645bf7c97265014e86878c0fdc9a67cc2aae2283d07a7f23c349d65996dbd4fd1b081804c0413c9bc53897c19e145e85d97c76176c7e7b610e8333f66
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
- ms = (request_info[:end_time] || Time.now) - request_info[:start_time]
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
 
@@ -2,5 +2,5 @@
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
4
  # @return [String] the library version
5
- AIRBRAKE_RUBY_VERSION = '3.0.0.rc.5'.freeze
5
+ AIRBRAKE_RUBY_VERSION = '3.0.0.rc.6'.freeze
6
6
  end
@@ -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":1.0,
78
- "sumsq":1.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAT\+AAAAB"},
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":6.0,
81
- "sumsq":36.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUDAAAAB"}\]}
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":60.0,
109
- "sumsq":3600.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUJwAAAB"},
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":60.0,
112
- "sumsq":3600.0,"tdigest":"AAAAAkA0AAAAAAAAAAAAAUJwAAAB"}\]}
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.5
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-12 00:00:00.000000000 Z
11
+ date: 2018-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tdigest