Class: ScoutApm::LayerConverters::AllocationMetricConverter
- Inherits:
-
ConverterBase
- Object
- ConverterBase
- ScoutApm::LayerConverters::AllocationMetricConverter
- Defined in:
- lib/scout_apm/layer_converters/allocation_metric_converter.rb
Instance Attribute Summary
Attributes inherited from ConverterBase
#request, #root_layer, #walker
Instance Method Summary collapse
Methods inherited from ConverterBase
#find_first_layer_of_type, #initialize, #scope_layer
Constructor Details
This class inherits a constructor from ScoutApm::LayerConverters::ConverterBase
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/scout_apm/layer_converters/allocation_metric_converter.rb', line 4 def call scope = scope_layer return {} unless scope return {} unless ScoutApm::Instruments::Allocations::ENABLED = MetricMeta.new("ObjectAllocations", {:scope => scope.legacy_metric_name}) stat = MetricStats.new stat.update!(root_layer.total_allocations) { => stat } end |