perfmon Metric names, descriptions, and thresholds #472
+456
−786
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for threshold expressions in metrics and refactors metric naming to deprecate legacy names. It adds new fields to the
MetricDefinition
struct for threshold logic, updates how metric names are handled throughout the codebase, and makes several changes to ensure threshold expressions are parsed, transformed, and evaluated consistently. Additionally, it introduces a command-line flag to optionally use legacy metric names for backward compatibility.Metric threshold support:
ThresholdExpression
,ThresholdVariables
, andThresholdEvaluable
fields to theMetricDefinition
struct, enabling metrics to have associated threshold logic that is parsed and evaluated at runtime. [1] [2]govaluate
and to transform their syntax for compatibility. [1] [2]Metric naming refactor:
LegacyName
in favor ofMetricName
throughout the codebase, updating filtering, lookup, and logging to use the new naming convention. [1] [2] [3] [4] [5] [6]--legacy-names
command-line flag to optionally use legacy metric names, with clear marking that this is deprecated and will be removed in the future. [1] [2] [3] [4]Metrics output and summary updates:
printMetrics
,summarizeMetrics
, etc.) to accept and utilize the full set of metric definitions, including threshold information, for more accurate reporting. [1] [2] [3] [4] [5]General improvements:
These changes collectively improve the flexibility and robustness of metric handling, especially for advanced use cases involving thresholds, while moving the project away from legacy naming conventions.