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

kvs: add transaction stats #6556

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Jan 16, 2025

Problem: In the future we would like to put a cap on the maximum number
of operations in a transaction. However, we do not have any stat tracking
of operations in a transaction.

Add transaction stats for commits and fences in the kvs module.


This is really a "prep" for #6125. I decided to split out the stats for commits & fences, since they are quite different. For example, if every process in an job did a fenced KVS transaction with a single op, this scales up with the size of cluster. So we want to count that differently than each op individually.

Note that I could have done "stats per namespace", but that wasn't really the information that we want. We mostly want to know what is the average and what is the max. So I did it "globally" vs per namespace.

@chu11
Copy link
Member Author

chu11 commented Jan 17, 2025

oops, looks like our CI doesn't have bc so everything failed :-) Re-worked the tests to use jq instead (actually is much cleaner now).

Edit: agh ... try again. CI didn't like my use of single quotes.

@chu11 chu11 force-pushed the kvs_txn_stats branch 4 times, most recently from f7e9efd to 4506ffa Compare January 18, 2025 00:34
chu11 added 3 commits January 17, 2025 16:34
Problem: In the future we would like to put a cap on the maximum number
of operations in a transaction.  However, we do not have any stat tracking
of operations in a transaction.

Add transaction stats for commits and fences in the kvs module.
Problem: The testing of stats clearing in the KVS is done
a little bit before the end of a set of tests.  This can be
inconvenient for future tests that do not wish stats to be cleared.

Move the clearing of stats tests towards the end of tests in
t1001-kvs-internals.t.
Problem: There is no coverage for the new KVS transaction stats.

Add coverage in t1001-kvs-internals.t.
@chu11
Copy link
Member Author

chu11 commented Jan 18, 2025

oops, i totally forgot about stats clearing. Tweaked and added a test.

Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 81.81818% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.42%. Comparing base (122bd11) to head (d8deacd).

Files with missing lines Patch % Lines
src/modules/kvs/kvs.c 81.81% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6556      +/-   ##
==========================================
- Coverage   79.44%   79.42%   -0.02%     
==========================================
  Files         531      531              
  Lines       88247    88269      +22     
==========================================
+ Hits        70110    70112       +2     
- Misses      18137    18157      +20     
Files with missing lines Coverage Δ
src/modules/kvs/kvs.c 72.54% <81.81%> (+0.13%) ⬆️

... and 10 files with indirect coverage changes

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