newrelic_rpm 3.5.7.58.beta → 3.5.7.59.beta
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/lib/new_relic/agent/instrumentation/queue_time.rb +9 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
@@ -52,8 +52,15 @@ module NewRelic
|
|
52
52
|
def parse_timestamp(string)
|
53
53
|
cut_off = Time.at(EARLIEST_ACCEPTABLE_TIMESTAMP)
|
54
54
|
[1_000_000, 1_000, 1].map do |divisor|
|
55
|
-
|
56
|
-
|
55
|
+
begin
|
56
|
+
Time.at(string.to_f / divisor)
|
57
|
+
rescue RangeError
|
58
|
+
# On Ruby versions built with a 32-bit time_t, attempting to
|
59
|
+
# instantiate a Time object in the far future raises a RangeError,
|
60
|
+
# in which case we know we've chosen the wrong divisor.
|
61
|
+
nil
|
62
|
+
end
|
63
|
+
end.compact.find { |candidate| candidate > cut_off }
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|