Class: ScoutApm::Instruments::HistogramReport

Inherits:
Object
  • Object
show all
Defined in:
lib/scout_apm/instruments/percentile_sampler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, histogram) ⇒ HistogramReport

Returns a new instance of HistogramReport.



8
9
10
11
# File 'lib/scout_apm/instruments/percentile_sampler.rb', line 8

def initialize(name, histogram)
  @name = name
  @histogram = histogram
end

Instance Attribute Details

#histogramObject (readonly)

Returns the value of attribute histogram.



6
7
8
# File 'lib/scout_apm/instruments/percentile_sampler.rb', line 6

def histogram
  @histogram
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/scout_apm/instruments/percentile_sampler.rb', line 5

def name
  @name
end

Instance Method Details

#combine!(other) ⇒ Object



13
14
15
16
17
# File 'lib/scout_apm/instruments/percentile_sampler.rb', line 13

def combine!(other)
  raise "Mismatched Histogram Names" unless name == other.name
  histogram.combine!(other.histogram)
  self
end