MCPcopy
hub / github.com/benoitc/gunicorn / main

Function main

benchmarks/dirty_streaming.py:728–751  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

726
727
728def 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
754if __name__ == "__main__":

Callers 1

dirty_streaming.pyFile · 0.70

Calls 6

run_full_benchmarksFunction · 0.85
run_quick_benchmarksFunction · 0.85
displayMethod · 0.80
save_jsonMethod · 0.80
nowMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected