From 661ee3cd24c1dff8fb7eac23babbc77e9d50a861 Mon Sep 17 00:00:00 2001 From: Geir Storli Date: Thu, 5 Sep 2024 15:21:58 +0000 Subject: [PATCH] Dump thread and jvm stats. --- .../ecommerce_hybrid_search_es.rb | 1 + .../ecommerce_hybrid_search_es_base.rb | 11 +++++++++++ .../ecommerce_hybrid_search_es_merge_1.rb | 1 + 3 files changed, 13 insertions(+) diff --git a/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es.rb b/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es.rb index c2ecf15e0..2c2fa3323 100644 --- a/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es.rb +++ b/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es.rb @@ -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") } diff --git a/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_base.rb b/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_base.rb index cc66f4776..a7fbdc2a5 100644 --- a/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_base.rb +++ b/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_base.rb @@ -27,6 +27,7 @@ def prepare_es_app install_es start_es create_index + dump_thread_stats end def install_es @@ -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) diff --git a/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_merge_1.rb b/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_merge_1.rb index 3cece4435..43745a72c 100644 --- a/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_merge_1.rb +++ b/tests/performance/ecommerce_hybrid_search/ecommerce_hybrid_search_es_merge_1.rb @@ -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