Skip to content

Fix stats totals and struct zeroing - #991

Open
rafalste wants to merge 2 commits into
Open-CAS:masterfrom
rafalste:fix_stats_totals_and_zeroing
Open

rafalste wants to merge 2 commits into
Open-CAS:masterfrom
rafalste:fix_stats_totals_and_zeroing

Conversation

@rafalste

Copy link
Copy Markdown
Contributor

Use cache and core totals for cleaner and prefetcher stats.
Use memset instead of an aggregate initializer to zero a struct.

When 'total' variable was used to fill cleaner and prefetcher stats it
held the pass-through's total instead of cache's and core's.
Rather than relying on a common 'total' variable, save cache and core
totals to a separate variables for cleaner and prefetcher totals.

Signed-off-by: Rafal Stefanowski <r.stefanowski@pm.me>
Use more straightforward and less confusing method for zeroing a struct
and do it without allocating additional temporary object.

Signed-off-by: Rafal Stefanowski <r.stefanowski@pm.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant