Skip to content

Commit

Permalink
Test disk usage metrics for attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
toregge committed Nov 11, 2024
1 parent 74083c8 commit 9ff4eb9
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 9ff4eb9

Please sign in to comment.