Skip to content

Commit

Permalink
Merge pull request #4264 from vespa-engine/toregge/test-disk-usage-me…
Browse files Browse the repository at this point in the history
…trics-for-attributes

Test disk usage metrics for attributes.
  • Loading branch information
geirst authored Nov 11, 2024
2 parents 0c93445 + 9ff4eb9 commit c738b89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/search/metrics/metrics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit c738b89

Please sign in to comment.