()
| 726 | |
| 727 | |
| 728 | def main(): |
| 729 | parser = argparse.ArgumentParser(description="Dirty streaming benchmarks") |
| 730 | parser.add_argument("--quick", action="store_true", help="Run quick benchmarks only") |
| 731 | parser.add_argument("--full", action="store_true", help="Run full benchmark suite") |
| 732 | parser.add_argument("--output", "-o", help="Output JSON file path") |
| 733 | args = parser.parse_args() |
| 734 | |
| 735 | if args.full: |
| 736 | results = asyncio.run(run_full_benchmarks()) |
| 737 | else: |
| 738 | results = asyncio.run(run_quick_benchmarks()) |
| 739 | |
| 740 | results.display() |
| 741 | |
| 742 | if args.output: |
| 743 | results.save_json(args.output) |
| 744 | else: |
| 745 | # Save to default location |
| 746 | output_dir = os.path.dirname(os.path.abspath(__file__)) |
| 747 | results_dir = os.path.join(output_dir, "results") |
| 748 | os.makedirs(results_dir, exist_ok=True) |
| 749 | timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") |
| 750 | output_file = os.path.join(results_dir, f"streaming_benchmark_{timestamp}.json") |
| 751 | results.save_json(output_file) |
| 752 | |
| 753 | |
| 754 | if __name__ == "__main__": |
no test coverage detected