From 9ff4eb9dd1a2026842a5b47f775bf12face2ad84 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Mon, 11 Nov 2024 13:33:36 +0100 Subject: [PATCH] Test disk usage metrics for attributes. --- tests/search/metrics/metrics.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/search/metrics/metrics.rb b/tests/search/metrics/metrics.rb index e4be63a5f..613b7cf3f 100644 --- a/tests/search/metrics/metrics.rb +++ b/tests/search/metrics/metrics.rb @@ -181,6 +181,9 @@ 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) end def assert_document_db_disk_io(metrics) @@ -218,6 +221,11 @@ def get_cached_disk_io_for_field(field_name, metrics) {"documenttype" => "test", "field" => field_name}) end + def get_size_on_disk_for_attribute_field(field_name, metrics) + metrics.get('content.proton.documentdb.ready.attribute.size_on_disk', + {"documenttype" => "test", "field" => field_name})["last"] + end + def dump_metric_names(metrics) metrics.json["values"].each do |metric| name = metric["name"]