Class: Datadog::Statsd::Schema::Analyzer::BaseFormatter
- Inherits:
-
Object
- Object
- Datadog::Statsd::Schema::Analyzer::BaseFormatter
show all
- Defined in:
- lib/datadog/statsd/schema/analyzer.rb
Overview
——————————————————————————————————————————————————————————————————————————————————————————————————————————————- Formatter classes ——————————————————————————————————————————————————————————————————————————————————————————————————————————————-
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(stdout:, stderr:, color:, analysis_result:) ⇒ BaseFormatter
Returns a new instance of BaseFormatter.
369
370
371
372
373
374
375
376
377
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 369
def initialize(stdout:, stderr:, color:, analysis_result:)
@stdout = stdout
@stderr = stderr
@color = color
@analysis_result = analysis_result.to_h.transform_values { |v| v.is_a?(Data) ? v.to_h : v }
@total_unique_metrics = @analysis_result[:total_unique_metrics]
@metrics_analysis = @analysis_result[:metrics_analysis]
@total_possible_custom_metrics = @analysis_result[:total_possible_custom_metrics]
end
|
Instance Attribute Details
#analysis_result ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def analysis_result
@analysis_result
end
|
#color ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def color
@color
end
|
#metrics_analysis ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def metrics_analysis
@metrics_analysis
end
|
#stderr ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def stderr
@stderr
end
|
#stdout ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def stdout
@stdout
end
|
#total_possible_custom_metrics ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def total_possible_custom_metrics
@total_possible_custom_metrics
end
|
#total_unique_metrics ⇒ Object
363
364
365
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 363
def total_unique_metrics
@total_unique_metrics
end
|
Instance Method Details
#render ⇒ Object
379
380
381
|
# File 'lib/datadog/statsd/schema/analyzer.rb', line 379
def render
raise NotImplementedError, "Subclasses must implement this method"
end
|