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

Dump thread and jvm stats. #4190

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def test_hybrid_search
prepare_es_app

benchmark_feed(feed_file_name, get_num_docs, @feed_threads, "feed")
dump_jvm_stats
benchmark_queries("after_feed", false, [1, 2, 4, 8, 16, 32, 64])
benchmark_queries("after_feed", true, [1])
feed_thread = Thread.new { benchmark_feed(feed_file_name, get_num_docs, @feed_threads, "refeed") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def prepare_es_app
install_es
start_es
create_index
dump_thread_stats
end

def install_es
Expand Down Expand Up @@ -61,6 +62,16 @@ def create_index
@node.execute("curl -X PUT '#{@es_endpoint}/product?pretty' -H 'Content-Type: application/json' -d @#{node_file}")
end

def dump_thread_stats
puts "Thread pool statistics:"
@node.execute("curl -X GET '#{@es_endpoint}/_cat/thread_pool?h=name,type,size'")
end

def dump_jvm_stats
puts "JVM statistics:"
@node.execute("curl -X GET '#{@es_endpoint}/_nodes/stats/jvm?pretty'")
end

def benchmark_feed(feed_file, num_docs, num_threads, label)
# This creates feed files with 6k documents each (~50 MB per file).
files = prepare_feed_files(feed_file, dirs.tmpdir + "feed/", 12000)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_hybrid_search

benchmark_feed(feed_file_name, get_num_docs, @feed_threads, "feed")
benchmark_force_merge(get_num_docs, 1)
dump_jvm_stats
benchmark_queries("after_merge", false, [1, 2, 4, 8, 16, 32, 64])
end

Expand Down