trashed 3.2.0 → 3.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd60c1035b68ae01277826155e500c675958f97a
4
- data.tar.gz: 264984b670dcceaecaf6054eeba872e78f412ff3
3
+ metadata.gz: 4899c11a38074aa3caa8f2a0ca2546c22ac7f0a8
4
+ data.tar.gz: 3e3c47014456bb2f1088a4a129e3717155518480
5
5
  SHA512:
6
- metadata.gz: aca33bba6021edcb5e1f363209604884f6f64de06c9b97f87095064562f3bb3faf0e6e9feda39a8980a7fa381f39c0aa5afa7cc5fc5cb578c46a9dd5a8a084d4
7
- data.tar.gz: 3a3ec7763247d51dcd5f020ede1abc9fb6d04e77a7e2b841d9a8c3d9e147ac105714b61c3cd904d62f4e9faafb0c08e8e50e8da1a960e9c6a97e01f757cbe4b7
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 @has_raw_data
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
@@ -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|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trashed
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Kemper