Skip to content

Commit

Permalink
Improve PerformanceMetricsStorageTransformer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Jan 24, 2024
1 parent 8a9b0f8 commit f0262ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Breaking**: Make `zfp` a private dependency by changing `Zfp{Bitstream,Field,Stream}` from `pub` to `pub(super)`
- **Breaking**: Make `zip` a private dependency by not exposing `ZipError` in `ZipStorageAdapterCreateError`
- Refine `UsageLogStorageTransformer` outputs and add docs
- Improve `PerformanceMetricsStorageTransformer` docs

### Removed
- **Breaking**: Remove `StorePrefixError::new`, deprecated since `v0.7.3`
Expand Down
6 changes: 5 additions & 1 deletion src/storage/storage_transformer/performance_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ use std::sync::{

use super::StorageTransformerExtension;

/// The performance metrics storage transformer.
/// The performance metrics storage transformer. Accumulates metrics, such as bytes read and written.
///
/// This storage transformer is for internal use and will not to be included in `storage_transformers` array metadata.
/// It is intended to aid in testing by allowing the application to validate that metrics (e.g., bytes read/written, total read/write operations, lock requests) match expected values for specific operations.
#[derive(Debug, Default)]
pub struct PerformanceMetricsStorageTransformer {
bytes_read: AtomicUsize,
Expand Down Expand Up @@ -79,6 +82,7 @@ impl PerformanceMetricsStorageTransformer {
}

impl StorageTransformerExtension for PerformanceMetricsStorageTransformer {
/// Returns [`None`], since this storage transformer is not intended to be included in array `storage_transformers` metadata.
fn create_metadata(&self) -> Option<Metadata> {
None
}
Expand Down

0 comments on commit f0262ec

Please sign in to comment.