diff options
author | Tor Brede Vekterli <vekterli@vespa.ai> | 2023-11-15 10:47:10 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@vespa.ai> | 2023-11-15 10:47:10 +0000 |
commit | 5330601cead4872151bdd446d94112faf24ee42a (patch) | |
tree | a5847f2b383cdafcf77c51a819005985a8adafcc /storage/src/tests/persistence/filestorage | |
parent | d7fea86dfce26c92c4365cbb7c2500cbcabbf54a (diff) |
Add fundamental metrics for async "remove by GID" SPI operation
Tracks invocation count, latency and failures (although we don't
expect to see any failures in this pipeline, since the remove ops
logically happen atomically with the bucket iteration).
Diffstat (limited to 'storage/src/tests/persistence/filestorage')
-rw-r--r-- | storage/src/tests/persistence/filestorage/filestormanagertest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp index 96618eb9206..4911ad88692 100644 --- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp +++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp @@ -1421,6 +1421,14 @@ void FileStorManagerTest::do_test_delete_bucket(bool use_throttled_delete) { StorBucketDatabase::WrappedEntry entry(_node->getStorageBucketDatabase().get(bid, "foo")); EXPECT_FALSE(entry.exists()); } + if (use_throttled_delete) { + auto& metrics = thread_metrics_of(*c.manager)->remove_by_gid; + EXPECT_EQ(metrics.failed.getValue(), 0); + EXPECT_EQ(metrics.count.getValue(), 1); + // We can't reliably test the actual latency here without wiring mock clock bumping into + // the async remove by GID execution, but we can at least test that we updated the metric. + EXPECT_EQ(metrics.latency.getCount(), 1); + } } // TODO remove once throttled behavior is the default |