Skip to content

Commit

Permalink
Write all performance results to a single json file.
Browse files Browse the repository at this point in the history
This will simplify the process of re-running the perf tests outside factory.
  • Loading branch information
geirst committed Oct 29, 2024
1 parent 948b7ab commit 3be2bd0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def test_hybrid_search
sleep 2
benchmark_queries("during_refeed", true, [1, 16, 64], {:runtime => 9})
feed_thread.join

write_performance_results_to_json_file
end

def feed_file_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ def run_fbench_helper(query_file, query_phase, query_type, clients, vespa_node,
vespa_node.execute("head -12 #{result_file}")
end

def write_performance_results_to_json_file
file_name = @dirs.resultoutput + "all_perf.json"
puts "Writing all performance results to '#{file_name}'"
File.open(file_name, "w") do |file|
get_performance_results.each { |result| file.puts(result.to_json) }
end
end

def teardown
super
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def test_hybrid_search
sleep 2
benchmark_queries("during_refeed", true, [1, 16, 64], {:runtime => 9})
feed_thread.join

write_performance_results_to_json_file
end

def teardown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def test_hybrid_search
dump_jvm_stats
benchmark_queries("after_merge", false, [1, 2, 4, 8, 16, 32, 64])
benchmark_queries("after_merge", true, [1, 2, 4, 8, 16, 32, 64])

write_performance_results_to_json_file
end

def teardown
Expand Down

0 comments on commit 3be2bd0

Please sign in to comment.