Skip to content

Commit

Permalink
Merge pull request #4190 from vespa-engine/geirst/ecommerce-thread-jv…
Browse files Browse the repository at this point in the history
…m-stats

Dump thread and jvm stats.
  • Loading branch information
geirst authored Sep 5, 2024
2 parents 4768487 + 661ee3c commit 8e44c33
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
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

0 comments on commit 8e44c33

Please sign in to comment.