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 +4 -4
- data/lib/salestation/web/statsd_middleware.rb +4 -4
- data/salestation.gemspec +1 -1
- 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: a23825882ed43419fc0dd8a70d9cc4cf0b24b318
|
4
|
+
data.tar.gz: dfbe08b1eaa5bfd9097e4ba9adbe68dead5660ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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,
|
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
|
43
|
-
(system_monotonic_time - from).round(
|
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
|
data/salestation.gemspec
CHANGED
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.
|
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-
|
11
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|