#!/usr/bin/env python3 """ Simple runner for financial context length performance tests. """ import asyncio import sys from pathlib import Path # Add the parent directory to the path to import the test module sys.path.append(str(Path(__file__).parent.parent)) from context_performance_tests import FinancialContextTester async def main(): """Run the context length performance tests.""" print("๐Ÿงช Financial AI Context Length Performance Testing") print("=" * 50) # Initialize tester tester = FinancialContextTester() try: # Run tests analysis = await tester.run_context_length_tests() # Generate report report = tester.generate_report(analysis) # Save report report_path = Path("testing/results/context_performance_report.md") report_path.parent.mkdir(parents=True, exist_ok=True) with open(report_path, 'w') as f: f.write(report) print(f"\nโœ… Tests completed successfully!") print(f"๐Ÿ“„ Report saved to: {report_path}") # Print key insights print(f"\n๐Ÿ“Š Key Insights:") print(f" โ€ข 128K context provides {analysis['summary']['average_business_value']:.1%} business value") print(f" โ€ข Average response time: {analysis['summary']['average_response_time']:.2f}s") print(f" โ€ข Analysis completeness: {analysis['summary']['average_completeness']:.1%}") except Exception as e: print(f"โŒ Test execution failed: {e}") return 1 return 0 if __name__ == "__main__": exit_code = asyncio.run(main()) sys.exit(exit_code)