logjam_agent 0.34.1 → 0.34.2

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
  SHA256:
3
- metadata.gz: 3be471be7625d64f757437409b251fbf4c60832e64f3d487a7c7b604287d146c
4
- data.tar.gz: '064602183035e66df6a8c4d61f79e1ae538d1be8a86e18400ac32dee485d0ad4'
3
+ metadata.gz: 2dfc15309d8eff89747771c28c14be766acdbffce10fa2121e07820b9d628d84
4
+ data.tar.gz: 32646c3d1020458de93151ed03f3c48248fe0bef27b404c21d1a87dfad05a82e
5
5
  SHA512:
6
- metadata.gz: 79c6c263075ca07cf8e6b734c2034730745bdebd6c1183dad9628b87ca3e796b1a5717a480eedd8c3ae4fafe33da9b85f6c2475da8f99802fbc9f6692a8d05ce
7
- data.tar.gz: 2cbe571005ac31cc5c2b709e83fd13141a0e5fdee4c665e2f0336641a57b874857b695063bc88e0c98ddcb7b5f65b24cee3f4355f29ba188b3226cf3c2fce8d4
6
+ metadata.gz: fb48957ea64f8da0a16770ff30ff927019c09d604ccec6ea018a9b43da9a67fb63eb656ea61d535e089516a340c5c5e42454f764acc9bdcefcab75b5dfba1f0f
7
+ data.tar.gz: 5bddcb2bc40fb7e5eade6dfe290fa9cde23b9b3fb69650f092a54b838ee780726d7a11e985f1e26f708bcbf6671cdb89910c4201fc82dc9ee57592191be3c85a
@@ -32,21 +32,24 @@ module LogjamAgent
32
32
 
33
33
  def call_app(request, env)
34
34
  start_time = Time.now
35
- wait_time_ms = 0.0
35
+ start_clock = Process.clock_gettime(Process::CLOCK_MONOTONIC)
36
+ wait_time = 0.0
36
37
  if http_start_time = extract_http_start_time(env)
37
- wait_time_ms = (start_time - http_start_time) * 1000
38
- if wait_time_ms > 0
38
+ wait_time = start_time - http_start_time
39
+ if wait_time > 0
39
40
  start_time = http_start_time
40
41
  else
41
- wait_time_ms = 0.0
42
+ wait_time = 0.0
42
43
  end
43
44
  end
45
+ wait_time_ms = wait_time * 1000
44
46
  before_dispatch(request, env, start_time, wait_time_ms)
45
47
  result = @app.call(env)
46
48
  rescue ActionDispatch::RemoteIp::IpSpoofAttackError
47
49
  result = [403, {}, ['Forbidden']]
48
50
  ensure
49
- run_time_ms = (Time.now - start_time) * 1000
51
+ end_clock = Process.clock_gettime(Process::CLOCK_MONOTONIC)
52
+ run_time_ms = (end_clock - start_clock + wait_time) * 1000
50
53
  after_dispatch(env, result, run_time_ms, wait_time_ms)
51
54
  end
52
55
 
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.34.1"
2
+ VERSION = "0.34.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.1
4
+ version: 0.34.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-23 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake