Class: ScoutApm::Instruments::HistogramReport
- Inherits:
-
Object
- Object
- ScoutApm::Instruments::HistogramReport
- Defined in:
- lib/scout_apm/instruments/percentile_sampler.rb
Instance Attribute Summary collapse
-
#histogram ⇒ Object
readonly
Returns the value of attribute histogram.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #combine!(other) ⇒ Object
-
#initialize(name, histogram) ⇒ HistogramReport
constructor
A new instance of HistogramReport.
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
#histogram ⇒ Object (readonly)
Returns the value of attribute histogram.
6 7 8 |
# File 'lib/scout_apm/instruments/percentile_sampler.rb', line 6 def histogram @histogram end |
#name ⇒ Object (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 |