Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable per Block device metrics #4202

Merged
merged 6 commits into from
Nov 1, 2023

Commits on Oct 31, 2023

  1. refactor: Move block device metrics to block module

    To prepare for per block device metrics:
    - Move BlockDeviceMetrics from logger to Block module.
    - Define a global buffer to put per device block metrics.
    
    Signed-off-by: Sudan Landge <sudanl@amazon.com>
    Sudan Landge authored and sudanl0 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    4e7c92d View commit details
    Browse the repository at this point in the history
  2. feat: use per device metrics instead of METRICS

    - Add metrics fs an field in Block{} to record metrics per block.
    - Remove new() implementation of BlockDeviceMetrics since default
      is enough.
    - For each block device added, allocate a metrics struct in global
      BLOCK_METRICS pool and save its pointer in Block::metrics.
    - Use Block's self.metrics instead of the aggregated METRICS to
      record per device block metrics.
    - Pass self.metrics to finish() and write_status_and_finish() to
      record per block device metrics.
    
    Signed-off-by: Sudan Landge <sudanl@amazon.com>
    Sudan Landge authored and sudanl0 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    4f7af7b View commit details
    Browse the repository at this point in the history
  3. test: Integration test for per block device metrics

    Add a test that has multiple block devices and validate
    aggregate block metrics.
    
    Signed-off-by: Sudan Landge <sudanl@amazon.com>
    Sudan Landge authored and sudanl0 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    0b5d123 View commit details
    Browse the repository at this point in the history
  4. changelog: per block device metrics

    Include per device block metrics in changelog.
    
    Signed-off-by: Sudan Landge <sudanl@amazon.com>
    Sudan Landge authored and sudanl0 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    a407d70 View commit details
    Browse the repository at this point in the history
  5. test: add unit test for per block device metrics

    Add unit test for block inc metrics and shared metrics.
    
    Signed-off-by: Sudan Landge <sudanl@amazon.com>
    Sudan Landge authored and sudanl0 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    2f1beb0 View commit details
    Browse the repository at this point in the history
  6. chore: move validation of FC metrics to host_tools

    test_cli_metrics_path and test_flush_metrics both validated breaking
    change in FC metrics so move the validation functions to host_tools
    which already had CI metrics related functions defined.
    
    Signed-off-by: Sudan Landge <sudanl@amazon.com>
    Sudan Landge authored and sudanl0 committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    c27703e View commit details
    Browse the repository at this point in the history