Class: Athenian::CodeCheckMetricID
- Inherits:
-
Object
- Object
- Athenian::CodeCheckMetricID
- Defined in:
- lib/athenian/models/code_check_metric_id.rb
Constant Summary collapse
- SUITES_COUNT =
'chk-suites-count'.freeze
- SUITES_IN_PRS_COUNT =
'chk-suites-in-prs-count'.freeze
- SUCCESSFUL_SUITES_COUNT =
'chk-successful-suites-count'.freeze
- FAILED_SUITES_COUNT =
'chk-failed-suites-count'.freeze
- CANCELLED_SUITES_COUNT =
'chk-cancelled-suites-count'.freeze
- SUCCESS_RATIO =
'chk-success-ratio'.freeze
- SUITE_TIME =
'chk-suite-time'.freeze
- ROBUST_SUITE_TIME =
'chk-robust-suite-time'.freeze
- SUITES_PER_PR =
'chk-suites-per-pr'.freeze
- SUITE_TIME_PER_PR =
'chk-suite-time-per-pr'.freeze
- PRS_WITH_CHECKS_COUNT =
'chk-prs-with-checks-count'.freeze
- FLAKY_COMMIT_CHECKS_COUNT =
'chk-flaky-commit-checks-count'.freeze
- PRS_MERGED_WITH_FAILED_CHECKS_COUNT =
'chk-prs-merged-with-failed-checks-count'.freeze
- PRS_MERGED_WITH_FAILED_CHECKS_RATIO =
'chk-prs-merged-with-failed-checks-ratio'.freeze
- CONCURRENCY_MAX =
'chk-concurrency-max'.freeze
- CONCURRENCY =
'chk-concurrency'.freeze
- ELAPSED_TIME_PER_CONCURRENCY =
'chk-elapsed-time-per-concurrency'.freeze
- SUITE_OCCUPANCY =
'chk-suite-occupancy'.freeze
- SUITE_CRITICAL_OCCUPANCY =
'chk-suite-critical-occupancy'.freeze
- SUITE_IMBALANCE =
'chk-suite-imbalance'.freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
36 37 38 |
# File 'lib/athenian/models/code_check_metric_id.rb', line 36 def self.all_vars @all_vars ||= [SUITES_COUNT, SUITES_IN_PRS_COUNT, SUCCESSFUL_SUITES_COUNT, FAILED_SUITES_COUNT, CANCELLED_SUITES_COUNT, SUCCESS_RATIO, SUITE_TIME, ROBUST_SUITE_TIME, SUITES_PER_PR, SUITE_TIME_PER_PR, PRS_WITH_CHECKS_COUNT, FLAKY_COMMIT_CHECKS_COUNT, PRS_MERGED_WITH_FAILED_CHECKS_COUNT, PRS_MERGED_WITH_FAILED_CHECKS_RATIO, CONCURRENCY_MAX, CONCURRENCY, ELAPSED_TIME_PER_CONCURRENCY, SUITE_OCCUPANCY, SUITE_CRITICAL_OCCUPANCY, SUITE_IMBALANCE].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
43 44 45 |
# File 'lib/athenian/models/code_check_metric_id.rb', line 43 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
50 51 52 53 |
# File 'lib/athenian/models/code_check_metric_id.rb', line 50 def build_from_hash(value) return value if CodeCheckMetricID.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #CodeCheckMetricID" end |