MCPcopy Create free account
hub / github.com/apache/fory / main

Function main

benchmarks/go/benchmark_report.py:428–462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

426
427
428def main():
429 # Accept output directory as argument, default to ./results
430 if len(sys.argv) > 1:
431 output_dir = Path(sys.argv[1])
432 else:
433 output_dir = Path(__file__).parent / "results"
434
435 # Try to parse results
436 txt_path = output_dir / "benchmark_results.txt"
437 json_path = output_dir / "benchmark_results.json"
438
439 results = None
440
441 if txt_path.exists():
442 print(f"Parsing {txt_path}...")
443 results = parse_benchmark_txt(txt_path)
444 elif json_path.exists():
445 print(f"Parsing {json_path}...")
446 results = parse_benchmark_json(json_path)
447 else:
448 print("Error: No benchmark results found.")
449 print("Run ./run.sh first to generate benchmark results.")
450 sys.exit(1)
451
452 if not results:
453 print("Error: Could not parse benchmark results.")
454 sys.exit(1)
455
456 print("Parsed results for data types:", list(results.keys()))
457
458 # Generate outputs
459 generate_combined_plot(results, output_dir)
460 generate_markdown_report(results, output_dir)
461
462 print("Done!")
463
464
465if __name__ == "__main__":

Callers 1

Calls 6

parse_benchmark_txtFunction · 0.85
parse_benchmark_jsonFunction · 0.85
generate_combined_plotFunction · 0.85
generate_markdown_reportFunction · 0.70
listFunction · 0.50
keysMethod · 0.45

Tested by

no test coverage detected