Skip to content

Commit

Permalink
Correct client mem usage stats
Browse files Browse the repository at this point in the history
Signed-off-by: Monthon Klongklaew <monthonk@amazon.com>
  • Loading branch information
monthonk committed Sep 25, 2024
1 parent 4cf5b53 commit ab1000a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mountpoint-s3-client/src/s3_crt_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,16 +1212,13 @@ impl ObjectClient for S3CrtClient {
let crt_buffer_pool_stats = self.inner.s3_client.poll_buffer_pool_usage_stats();
let mem_allocated = crt_buffer_pool_stats
.primary_allocated
.saturating_add(crt_buffer_pool_stats.secondary_reserved)
.saturating_add(crt_buffer_pool_stats.secondary_used)
.saturating_add(crt_buffer_pool_stats.forced_used);
.saturating_add(crt_buffer_pool_stats.secondary_used);
let mem_reserved = crt_buffer_pool_stats
.primary_reserved
.saturating_add(crt_buffer_pool_stats.secondary_reserved);
let mem_used = crt_buffer_pool_stats
.primary_used
.saturating_add(crt_buffer_pool_stats.secondary_used)
.saturating_add(crt_buffer_pool_stats.forced_used);
.saturating_add(crt_buffer_pool_stats.secondary_used);
Some(MemoryUsageStats {
mem_allocated,
mem_reserved,
Expand Down

0 comments on commit ab1000a

Please sign in to comment.