Module: Datadog::CI::TestOptimisation::Telemetry
- Defined in:
- lib/datadog/ci/test_optimisation/telemetry.rb
Overview
Telemetry for test optimisation component
Class Method Summary collapse
- .code_coverage_files(count) ⇒ Object
- .code_coverage_finished(test) ⇒ Object
- .code_coverage_is_empty ⇒ Object
- .code_coverage_started(test) ⇒ Object
- .itr_forced_run ⇒ Object
- .itr_skipped ⇒ Object
- .itr_unskippable ⇒ Object
- .tags_for_itr_metrics ⇒ Object
- .tags_for_test(test) ⇒ Object
Class Method Details
.code_coverage_files(count) ⇒ Object
25 26 27 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 25 def self.code_coverage_files(count) Utils::Telemetry.distribution(Ext::Telemetry::METRIC_CODE_COVERAGE_FILES, count.to_f) end |
.code_coverage_finished(test) ⇒ Object
17 18 19 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 17 def self.code_coverage_finished(test) Utils::Telemetry.inc(Ext::Telemetry::METRIC_CODE_COVERAGE_FINISHED, 1, (test)) end |
.code_coverage_is_empty ⇒ Object
21 22 23 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 21 def self.code_coverage_is_empty Utils::Telemetry.inc(Ext::Telemetry::METRIC_CODE_COVERAGE_IS_EMPTY, 1) end |
.code_coverage_started(test) ⇒ Object
13 14 15 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 13 def self.code_coverage_started(test) Utils::Telemetry.inc(Ext::Telemetry::METRIC_CODE_COVERAGE_STARTED, 1, (test)) end |
.itr_forced_run ⇒ Object
33 34 35 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 33 def self.itr_forced_run Utils::Telemetry.inc(Ext::Telemetry::METRIC_ITR_FORCED_RUN, 1, ) end |
.itr_skipped ⇒ Object
29 30 31 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 29 def self.itr_skipped Utils::Telemetry.inc(Ext::Telemetry::METRIC_ITR_SKIPPED, 1, ) end |
.itr_unskippable ⇒ Object
37 38 39 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 37 def self.itr_unskippable Utils::Telemetry.inc(Ext::Telemetry::METRIC_ITR_UNSKIPPABLE, 1, ) end |
.tags_for_itr_metrics ⇒ Object
48 49 50 51 52 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 48 def self. { Ext::Telemetry::TAG_EVENT_TYPE => Ext::Telemetry::EventType::TEST } end |
.tags_for_test(test) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/datadog/ci/test_optimisation/telemetry.rb', line 41 def self.(test) { Ext::Telemetry::TAG_TEST_FRAMEWORK => test.get_tag(Ext::Test::TAG_FRAMEWORK), Ext::Telemetry::TAG_LIBRARY => Ext::Telemetry::Library::CUSTOM } end |