Skip to content

Commit

Permalink
t: cover kvs transaction stats
Browse files Browse the repository at this point in the history
Problem: There is no coverage for the new KVS transaction stats.

Add coverage in t1001-kvs-internals.t.
  • Loading branch information
chu11 committed Jan 16, 2025
1 parent ea104d3 commit d35f515
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions t/t1001-kvs-internals.t
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,41 @@ test_expect_success 'kvs: 1 pending requests at end of tests before module remov
test $pendingcount1 -eq 1
'

#
# transaction module stats
#

test_expect_success 'kvs: module stats returns reasonable transaction stats' '
commitcount=$(flux module stats -p transactions.commit.count kvs) &&
test $commitcount -ne 0 &&
commitmin=$(flux module stats -p transactions.commit.min kvs) &&
result=$(echo "$commitmin > 0.0" | bc -l) &&
test $result -eq 1 &&
commitmax=$(flux module stats -p transactions.commit.max kvs) &&
result=$(echo "$commitmax >= $commitmin" | bc -l) &&
test $result -eq 1 &&
commitmean=$(flux module stats -p transactions.commit.mean kvs) &&
result=$(echo "$commitmean > 0.0" | bc -l) &&
test $result -eq 1 &&
commitstddev=$(flux module stats -p transactions.commit.stddev kvs) &&
result=$(echo "$commitstddev >= 0.0" | bc -l) &&
test $result -eq 1 &&
fencecount=$(flux module stats -p transactions.fence.count kvs) &&
test $fencecount -ne 0 &&
fencemin=$(flux module stats -p transactions.fence.min kvs) &&
result=$(echo "$fencemin > 0.0" | bc -l) &&
test $result -eq 1 &&
fencemax=$(flux module stats -p transactions.fence.max kvs) &&
result=$(echo "$fencemax >= $fencemin" | bc -l) &&
test $result -eq 1 &&
fencemean=$(flux module stats -p transactions.fence.mean kvs) &&
result=$(echo "$fencemean > 0.0" | bc -l) &&
test $result -eq 1 &&
fencestddev=$(flux module stats -p transactions.fence.stddev kvs) &&
result=$(echo "$fencestddev >= 0.0" | bc -l) &&
test $result -eq 1
'

#
# test ENOSYS on unfinished requests when unloading the KVS module
#
Expand Down

0 comments on commit d35f515

Please sign in to comment.