Added validation functions for opmon metrics #136
Merged
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.
Description
These changes are for
fddaq-v5.6.0...As part of adding the validation of opmon metrics to integtests (DUNE-DAQ/daq-deliverables#202), I created several utility functions in a new file named
opmon_metric_checks.py. There is a function to collate a set of metric files on disk into a single JSON structure and a couple of validation functions - one to check whether the number of metric samples is within a specified range and one to check whether the sum of the metric values is within a specified range.These changes also include a bug fix - the directory glob to find the metric files produced in an integtest needed to be adjusted.
The way to test these changes is to run the modified regression tests in the
daqsystemtestrepo (which are part of a correlated PR).Type of change
Testing checklist
dbt-build --unittest)pytest -s minimal_system_quick_test.py)daqsystemtest_integtest_bundle.sh)python -m pytest)pre-commit run --all-files)Further checks
dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)