trashed 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trashed/instruments/ruby_gc_profiler.rb +2 -5
- data/lib/trashed/reporter.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4899c11a38074aa3caa8f2a0ca2546c22ac7f0a8
|
4
|
+
data.tar.gz: 3e3c47014456bb2f1088a4a129e3717155518480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dd32f83be957ff28476cbc8cc79c527ccb250c368dd58c771661786a20eeb08c797576e409ad70881bde674223fae927bd9a97094a5f129dc9aafa9f7b1e031
|
7
|
+
data.tar.gz: 0e920e3d2bcd59fdc8c3c75e3e4b7cbc072c045f048192f0596c80c5048bd32fbf71593774e39274e217dfdecbb676542018065d60b6ed5b2893765508ff1394
|
@@ -1,10 +1,6 @@
|
|
1
1
|
module Trashed
|
2
2
|
module Instruments
|
3
3
|
class RubyGCProfiler
|
4
|
-
def initialize
|
5
|
-
@has_raw_data = GC::Profiler.respond_to?(:raw_data)
|
6
|
-
end
|
7
|
-
|
8
4
|
# Captures out-of-band GC time and stats.
|
9
5
|
def start(state, timings, gauges)
|
10
6
|
GC::Profiler.enable
|
@@ -15,11 +11,12 @@ module Trashed
|
|
15
11
|
def measure(state, timings, gauges, captured = :GC)
|
16
12
|
timings[:"#{captured}.time"] ||= GC::Profiler.total_time
|
17
13
|
|
18
|
-
if
|
14
|
+
if GC::Profiler.respond_to? :raw_data
|
19
15
|
timings[:"#{captured}.count"] ||= GC::Profiler.raw_data.size
|
20
16
|
timings[:'GC.interval'] = GC::Profiler.raw_data.map { |data| data[:GC_INVOKE_TIME] }
|
21
17
|
end
|
22
18
|
|
19
|
+
# Clears .total_time and .raw_data
|
23
20
|
GC::Profiler.clear
|
24
21
|
end
|
25
22
|
end
|
data/lib/trashed/reporter.rb
CHANGED
@@ -84,7 +84,7 @@ module Trashed
|
|
84
84
|
case value
|
85
85
|
when Array
|
86
86
|
value.each do |v|
|
87
|
-
send_to_statsd statsd, method, { metric => v }, namespace, dimensions
|
87
|
+
send_to_statsd statsd, method, sample_rate, { metric => v }, namespace, dimensions
|
88
88
|
end
|
89
89
|
when Numeric
|
90
90
|
Array(dimensions || :All).each do |dimension|
|