Skip to content

Commit

Permalink
Merge pull request #4203 from vespa-engine/geirst/ecommerce-more-repo…
Browse files Browse the repository at this point in the history
…rt-formats

Support creating more report formats.
  • Loading branch information
geirst committed Sep 19, 2024
2 parents 5c43f7d + abae7a6 commit 3936cba
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/performance/ecommerce_hybrid_search/create_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ def main():
parser.add_argument('vespa_file', type=str, help='Path to Vespa result file')
parser.add_argument('es_file', type=str, help='Path to ES result file')
parser.add_argument('report_type',
choices=['feed', 'query_1', 'query_n'],
choices=['feed', 'query_1', 'query_n', 'query_n_filter', 'query_n_refeed'],
help='Type of report to create')
parser.add_argument('--format', default='df', choices=['csv', 'df'], help='Output format printed to stdout')
parser.add_argument('--cpus', default=128, help='The number of CPUs used for the performance tests')

args = parser.parse_args()
report = args.report_type
global cpu_cores
cpu_cores = args.cpus
cpu_cores = int(args.cpus)
if report == 'feed':
print_feed_ratio_summary(args.vespa_file, args.es_file, args.format)
elif report == 'query_1':
Expand All @@ -142,6 +142,14 @@ def main():
print_query_ratio_summary(args.vespa_file, args.es_file,
"phase == 'after_flush' and filter == False",
args.format)
elif report == 'query_n_filter':
print_query_ratio_summary(args.vespa_file, args.es_file,
"phase == 'after_flush' and filter == True",
args.format)
elif report == 'query_n_refeed':
print_query_ratio_summary(args.vespa_file, args.es_file,
"phase == 'during_refeed' and filter == False",
args.format)


if __name__ == "__main__":
Expand Down

0 comments on commit 3936cba

Please sign in to comment.