From a226fcb5c2bae41516265da9aa7beab6f7c47648 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Mon, 18 Nov 2024 13:27:35 +0000 Subject: [PATCH] Disk usage metrics have changed name. --- tests/search/metrics/metrics.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/search/metrics/metrics.rb b/tests/search/metrics/metrics.rb index dbfad4846..b9de3c291 100644 --- a/tests/search/metrics/metrics.rb +++ b/tests/search/metrics/metrics.rb @@ -87,7 +87,7 @@ def test_metrics sleep 1 # Wait for disk index to be used for search assert_hitcount("f1:c", 2) metrics = vespa.search['test'].first.get_total_metrics # Get metrics containing disk index - assert_document_db_size_on_disk(metrics) + assert_document_db_field_disk_usage(metrics) assert_document_db_disk_io(metrics) assert_document_db_cached_disk_io(metrics, false) assert_hitcount("f1:c", 2) @@ -177,13 +177,13 @@ def flush_memory_index wait_for_log_matches(/.*flush\.complete.*memoryindex\.flush/, 1) end - def assert_document_db_size_on_disk(metrics) - f1_size_on_disk = get_size_on_disk_for_field('f1', metrics) - puts "f1_size_on_disk = " + f1_size_on_disk.to_s - assert(1000 < f1_size_on_disk) - f2_size_on_disk = get_size_on_disk_for_attribute_field('f2', metrics) - puts "f2_size_on_disk = " + f2_size_on_disk.to_s - assert(1000 < f2_size_on_disk) + def assert_document_db_field_disk_usage(metrics) + f1_disk_usage = get_disk_usage_for_field('f1', metrics) + puts "f1_disk_usage = " + f1_disk_usage.to_s + assert(1000 < f1_disk_usage) + f2_disk_usage = get_disk_usage_for_attribute_field('f2', metrics) + puts "f2_disk_usage = " + f2_disk_usage.to_s + assert(1000 < f2_disk_usage) end def assert_document_db_disk_io(metrics) @@ -209,8 +209,8 @@ def assert_document_db_cached_disk_io(metrics, expect_cached) end end - def get_size_on_disk_for_field(field_name, metrics) - metrics.get('content.proton.documentdb.ready.index.size_on_disk', + def get_disk_usage_for_field(field_name, metrics) + metrics.get('content.proton.documentdb.ready.index.disk_usage', {"documenttype" => "test", "field" => field_name})["last"] end @@ -229,8 +229,8 @@ def get_postinglist_cache_hit_rate(metrics) metrics.get('content.proton.index.cache.postinglist.hit_rate')['last'] end - def get_size_on_disk_for_attribute_field(field_name, metrics) - metrics.get('content.proton.documentdb.ready.attribute.size_on_disk', + def get_disk_usage_for_attribute_field(field_name, metrics) + metrics.get('content.proton.documentdb.ready.attribute.disk_usage', {"documenttype" => "test", "field" => field_name})["last"] end