Skip to content

Commit

Permalink
Count missing values as reads in PerformanceMetricsStorageAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Oct 31, 2024
1 parent b648c46 commit 68b9b29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions zarrs_storage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Breaking**: Bump MSRV to 1.77 (21 March, 2024)
- **Breaking**: Rename `StoreKeyStartValue` to `StoreKeyOffsetValue`
- Adds `offset` method and removes `start` and `end`
- Count missing values as reads in `PerformanceMetricsStorageAdapter`

### Removed
- **Breaking**: Remove `ByteRange::offset()`
Expand Down
2 changes: 1 addition & 1 deletion zarrs_storage/src/storage_adapter/performance_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ impl<TStorage: ?Sized + ReadableStorageTraits> ReadableStorageTraits
if let Some(values) = &values {
let bytes_read = values.iter().map(Bytes::len).sum();
self.bytes_read.fetch_add(bytes_read, Ordering::Relaxed);
self.reads.fetch_add(byte_ranges.len(), Ordering::Relaxed);
}
self.reads.fetch_add(byte_ranges.len(), Ordering::Relaxed);
Ok(values)
}

Expand Down

0 comments on commit 68b9b29

Please sign in to comment.