Class: Aikido::Zen::Collector::SinkStats::CompressedTiming Private
- Inherits:
-
Struct
- Object
- Struct
- Aikido::Zen::Collector::SinkStats::CompressedTiming
- Defined in:
- lib/aikido/zen/collector/sink_stats.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#compressed_at ⇒ Object
Returns the value of attribute compressed_at.
-
#mean ⇒ Object
Returns the value of attribute mean.
-
#percentiles ⇒ Object
Returns the value of attribute percentiles.
Instance Method Summary collapse
- #as_json ⇒ Object private
Instance Attribute Details
#compressed_at ⇒ Object
Returns the value of attribute compressed_at
85 86 87 |
# File 'lib/aikido/zen/collector/sink_stats.rb', line 85 def compressed_at @compressed_at end |
#mean ⇒ Object
Returns the value of attribute mean
85 86 87 |
# File 'lib/aikido/zen/collector/sink_stats.rb', line 85 def mean @mean end |
#percentiles ⇒ Object
Returns the value of attribute percentiles
85 86 87 |
# File 'lib/aikido/zen/collector/sink_stats.rb', line 85 def percentiles @percentiles end |
Instance Method Details
#as_json ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
86 87 88 89 90 91 92 |
# File 'lib/aikido/zen/collector/sink_stats.rb', line 86 def as_json { averageInMs: mean * 1000, percentiles: percentiles.transform_values { |t| t * 1000 }, compressedAt: compressed_at.to_i * 1000 } end |