unicorn-instruments 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/unicorn-instruments.rb +3 -3
  2. metadata +1 -1
@@ -16,12 +16,12 @@ class Unicorn::HttpServer
16
16
  nr = 0
17
17
  worker.tick = Time.now.to_i
18
18
  while sock = ready.shift
19
- start_process = Time.now.to_i
19
+ start_process = Time.now
20
20
  if client = sock.kgio_tryaccept
21
21
  process_client(client)
22
22
  nr += 1
23
- elapsed = (Time.now.to_i - start_process) * 1000
24
- $stdout.puts("measure=unicorn.process val=#{elapsed}")
23
+ elapsed = (Time.now.to_f - start_process.to_f) * 1000
24
+ $stdout.puts("measure.unicorn.process=#{elapsed.round}ms")
25
25
  worker.tick = Time.now.to_i
26
26
  end
27
27
  break if nr < 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicorn-instruments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: