Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test disk usage metrics for attributes. #4264

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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