diff --git a/src/modules/kvs/kvs.c b/src/modules/kvs/kvs.c index a55c7b8b0709..4cd5043d6552 100644 --- a/src/modules/kvs/kvs.c +++ b/src/modules/kvs/kvs.c @@ -2448,7 +2448,7 @@ static void stats_get_cb (flux_t *h, "{ s:O s:O s:{s:O s:O} s:i }", "cache", cstats, "namespace", nsstats, - "transactions", + "transaction-opcount", "commit", txncstats, "fence", txnfstats, "pending_requests", zhashx_size (ctx->requests)) < 0) diff --git a/t/t1001-kvs-internals.t b/t/t1001-kvs-internals.t index ec113a52f9e6..525edcef784f 100755 --- a/t/t1001-kvs-internals.t +++ b/t/t1001-kvs-internals.t @@ -461,36 +461,6 @@ test_expect_success 'kvs: read-your-writes consistency on alt namespace' ' flux kvs namespace remove rywtestns ' -# -# test clear of stats -# - -# each store of largeval will increase the noop store count, b/c we -# know that the identical large value will be cached as raw data - -test_expect_success 'kvs: clear stats locally' ' - flux kvs unlink -Rf $DIR && - flux module stats -c kvs && - flux module stats --parse "namespace.primary.#no-op stores" kvs | grep -q 0 && - flux kvs put $DIR.largeval1=$largeval && - flux kvs put $DIR.largeval2=$largeval && - ! flux module stats --parse "namespace.primary.#no-op stores" kvs | grep -q 0 && - flux module stats -c kvs && - flux module stats --parse "namespace.primary.#no-op stores" kvs | grep -q 0 -' - -test_expect_success NO_ASAN 'kvs: clear stats globally' ' - flux kvs unlink -Rf $DIR && - flux module stats -C kvs && - flux exec -n sh -c "flux module stats --parse \"namespace.primary.#no-op stores\" kvs | grep -q 0" && - for i in `seq 0 $((${SIZE} - 1))`; do - flux exec -n -r $i sh -c "flux kvs put $DIR.$i.largeval1=$largeval $DIR.$i.largeval2=$largeval" - done && - ! flux exec -n sh -c "flux module stats --parse \"namespace.primary.#no-op stores\" kvs | grep -q 0" && - flux module stats -C kvs && - flux exec -n sh -c "flux module stats --parse \"namespace.primary.#no-op stores\" kvs | grep -q 0" -' - # # test fence api # @@ -534,6 +504,36 @@ test_expect_success 'kvs: 1 pending requests at end of tests before module remov test $pendingcount1 -eq 1 ' +# +# test clear of stats +# + +# each store of largeval will increase the noop store count, b/c we +# know that the identical large value will be cached as raw data + +test_expect_success 'kvs: clear stats locally' ' + flux kvs unlink -Rf $DIR && + flux module stats -c kvs && + flux module stats --parse "namespace.primary.#no-op stores" kvs | grep -q 0 && + flux kvs put $DIR.largeval1=$largeval && + flux kvs put $DIR.largeval2=$largeval && + ! flux module stats --parse "namespace.primary.#no-op stores" kvs | grep -q 0 && + flux module stats -c kvs && + flux module stats --parse "namespace.primary.#no-op stores" kvs | grep -q 0 +' + +test_expect_success NO_ASAN 'kvs: clear stats globally' ' + flux kvs unlink -Rf $DIR && + flux module stats -C kvs && + flux exec -n sh -c "flux module stats --parse \"namespace.primary.#no-op stores\" kvs | grep -q 0" && + for i in `seq 0 $((${SIZE} - 1))`; do + flux exec -n -r $i sh -c "flux kvs put $DIR.$i.largeval1=$largeval $DIR.$i.largeval2=$largeval" + done && + ! flux exec -n sh -c "flux module stats --parse \"namespace.primary.#no-op stores\" kvs | grep -q 0" && + flux module stats -C kvs && + flux exec -n sh -c "flux module stats --parse \"namespace.primary.#no-op stores\" kvs | grep -q 0" +' + # # test ENOSYS on unfinished requests when unloading the KVS module #