salestation 3.5.0 → 3.5.1

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: 4fd4756c2f6c74060b5a8fc8d7c86c8b4e4b78ec
4
- data.tar.gz: 74aae6794e107f5d25f6bbffd92f43e7d940b469
3
+ metadata.gz: a23825882ed43419fc0dd8a70d9cc4cf0b24b318
4
+ data.tar.gz: dfbe08b1eaa5bfd9097e4ba9adbe68dead5660ee
5
5
  SHA512:
6
- metadata.gz: 500d7c1894f02b898ff7b6c7cea53b3fc84699440b1d031bdca0c3f9d12dc2e463c3360d768386e53ed31d18e44e6cb7d04af73d6238173e8b7c52740c3c305c
7
- data.tar.gz: 2372c5e2e508edc5949b00476e5e4dc93ffd48d4996d686584b49b943792c83f3b5f384854f5e986896235cb76b220d6931d1c79ebe9252fee08ed794199c125
6
+ metadata.gz: 1d177e56a051fed32219225b9a7c4a8ad289eeb87c96d4a03a1826df7e198352913850bb6754818a6be912a90777cd4569733710b9c6d921a1fcd31c0dc33a53
7
+ data.tar.gz: fb1bfd02506a1d750f62e0ba045cbb1a12f0f6f0fd17a2d6065e4f973e2f0ad1191927626ccbbeb5184f5894ca960aece316df048041cae28bd797cd9cf9cdd2
@@ -5,7 +5,7 @@ module Salestation
5
5
  class StatsdMiddleware
6
6
  EXTRA_TAGS_ENV_KEY = 'salestation.statsd.tags'
7
7
 
8
- DURATION_PRECISION = 6
8
+ DURATION_MILLISECOND_PRECISION = 3
9
9
 
10
10
  def initialize(app, statsd, metric:)
11
11
  @app = app
@@ -32,15 +32,15 @@ module Salestation
32
32
  "status:#{ status }"
33
33
  ] + env.fetch(EXTRA_TAGS_ENV_KEY, [])
34
34
 
35
- @statsd.timing(@metric, duration(from: start), tags: tags)
35
+ @statsd.timing(@metric, duration_ms(from: start), tags: tags)
36
36
 
37
37
  [status, header, body]
38
38
  end
39
39
 
40
40
  private
41
41
 
42
- def duration(from:)
43
- (system_monotonic_time - from).round(DURATION_PRECISION)
42
+ def duration_ms(from:)
43
+ ((system_monotonic_time - from) * 1000).round(DURATION_MILLISECOND_PRECISION)
44
44
  end
45
45
 
46
46
  def system_monotonic_time
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "salestation"
7
- spec.version = "3.5.0"
7
+ spec.version = "3.5.1"
8
8
  spec.authors = ["Glia TechMovers"]
9
9
  spec.email = ["techmovers@glia.com"]
10
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salestation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glia TechMovers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2020-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler