diff --git a/benchmark/.claude/checkpoints/1754445107.json b/benchmark/.claude/checkpoints/1754445107.json new file mode 100644 index 0000000000..af3761c060 --- /dev/null +++ b/benchmark/.claude/checkpoints/1754445107.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250806-015147", "file": "/workspaces/claude-code-flow/benchmark/tests/integration/test_integration.py", "timestamp": "2025-08-06T01:51:47Z", "type": "pre-edit", "original_branch": "alpha-88"} diff --git a/benchmark/.claude/checkpoints/1754445109.json b/benchmark/.claude/checkpoints/1754445109.json new file mode 100644 index 0000000000..8c673021fd --- /dev/null +++ b/benchmark/.claude/checkpoints/1754445109.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250806-015149", "file": "/workspaces/claude-code-flow/benchmark/tests/integration/test_integration.py", "timestamp": "2025-08-06T01:51:49Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/system-metrics.json | 5266 +++----------------- benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +- benchmark/.claude/checkpoints/1754445104.json | 1 + benchmark/.claude/checkpoints/1754445106.json | 1 + benchmark/ci_performance_integration.py | 754 --- benchmark/compare_optimizations.py | 172 - benchmark/continuous_performance_monitor.py | 673 --- benchmark/demo_comprehensive.py | 233 - benchmark/demo_mle_star.py | 152 - benchmark/demo_real_benchmark.py | 219 - benchmark/example_usage.py | 249 - .../__pycache__/benchmark_runner.cpython-312.pyc | Bin 24173 -> 0 bytes .../automated_test_runner.cpython-312.pyc | Bin 32696 -> 0 bytes .../__pycache__/parallel_executor.cpython-312.pyc | Bin 23676 -> 0 bytes .../__pycache__/result_collector.cpython-312.pyc | Bin 39201 -> 0 bytes benchmark/hive-mind-load-test.py | 902 ---- benchmark/hive-mind-stress-test.py | 935 ---- benchmark/mle_star_benchmark_example.py | 229 - benchmark/performance_dashboard.py | 769 --- benchmark/quick_test_integration.py | 44 - ...trics_1cd14167-2141-4899-98d5-b5ee82fd8d2a.json | 66 + ...eport_1cd14167-2141-4899-98d5-b5ee82fd8d2a.json | 47 + benchmark/run-load-tests.py | 479 -- benchmark/run_performance_tests.py | 550 -- benchmark/simple-load-test.py | 322 -- .../__pycache__/__init__.cpython-312.pyc | Bin 2870 -> 2879 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1345 -> 0 bytes .../__pycache__/memory_profiler.cpython-312.pyc | Bin 43459 -> 0 bytes .../__pycache__/metric_aggregator.cpython-312.pyc | Bin 42675 -> 0 bytes .../__pycache__/neural_benchmarks.cpython-312.pyc | Bin 44186 -> 0 bytes .../performance_analyzer.cpython-312.pyc | Bin 57821 -> 0 bytes .../__pycache__/token_optimizer.cpython-312.pyc | Bin 40053 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 1652 -> 0 bytes .../__pycache__/batch_processor.cpython-312.pyc | Bin 40756 -> 0 bytes .../__pycache__/decision_engine.cpython-312.pyc | Bin 44984 -> 0 bytes .../automation/__pycache__/models.cpython-312.pyc | Bin 2252 -> 0 bytes .../__pycache__/pipeline_manager.cpython-312.pyc | Bin 32505 -> 0 bytes .../__pycache__/resource_pool.cpython-312.pyc | Bin 38372 -> 0 bytes .../__pycache__/workflow_executor.cpython-312.pyc | Bin 43709 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 738 -> 0 bytes .../__pycache__/optimizer.cpython-312.pyc | Bin 27444 -> 0 bytes .../__pycache__/rules_engine.cpython-312.pyc | Bin 20977 -> 0 bytes .../__pycache__/templates.cpython-312.pyc | Bin 21167 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 2698 -> 0 bytes .../config/__pycache__/__init__.cpython-312.pyc | Bin 524 -> 533 bytes .../__pycache__/unified_config.cpython-312.pyc | Bin 27458 -> 27467 bytes .../core/__pycache__/__init__.cpython-312.pyc | Bin 1415 -> 1424 bytes .../__pycache__/base_interfaces.cpython-312.pyc | Bin 20843 -> 20852 bytes .../__pycache__/benchmark_engine.cpython-312.pyc | Bin 7620 -> 7629 bytes .../core/__pycache__/models.cpython-312.pyc | Bin 18629 -> 18638 bytes .../optimized_benchmark_engine.cpython-312.pyc | Bin 15770 -> 15779 bytes .../orchestration_manager.cpython-312.pyc | Bin 25940 -> 25949 bytes .../__pycache__/parallel_executor.cpython-312.pyc | Bin 35716 -> 35725 bytes .../__pycache__/result_aggregator.cpython-312.pyc | Bin 1029 -> 1038 bytes .../__pycache__/task_scheduler.cpython-312.pyc | Bin 22516 -> 22525 bytes .../mle_star/__pycache__/__init__.cpython-312.pyc | Bin 1091 -> 0 bytes .../__pycache__/ensemble_executor.cpython-312.pyc | Bin 24374 -> 0 bytes .../__pycache__/ml_scenarios.cpython-312.pyc | Bin 28015 -> 0 bytes .../__pycache__/model_coordinator.cpython-312.pyc | Bin 38329 -> 0 bytes .../performance_tracker.cpython-312.pyc | Bin 31006 -> 0 bytes .../__pycache__/voting_strategies.cpython-312.pyc | Bin 31206 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 2003 -> 2012 bytes .../__pycache__/analysis_strategy.cpython-312.pyc | Bin 3220 -> 3229 bytes .../__pycache__/auto_strategy.cpython-312.pyc | Bin 5525 -> 5534 bytes .../__pycache__/base_strategy.cpython-312.pyc | Bin 2972 -> 2981 bytes .../development_strategy.cpython-312.pyc | Bin 6692 -> 6701 bytes .../maintenance_strategy.cpython-312.pyc | Bin 3239 -> 3248 bytes .../optimization_strategy.cpython-312.pyc | Bin 3290 -> 3299 bytes .../__pycache__/research_strategy.cpython-312.pyc | Bin 6215 -> 6224 bytes .../__pycache__/testing_strategy.cpython-312.pyc | Bin 3181 -> 3190 bytes benchmark/swarm_performance_suite.py | 840 ---- benchmark/test_claude_optimizer.py | 235 - benchmark/test_integration.py | 274 - benchmark/test_mle_star_integration.py | 225 - benchmark/test_real_benchmark_engine.py | 317 -- benchmark/test_real_claude_flow.py | 218 - benchmark/test_real_metrics.py | 128 - benchmark/test_real_simple.py | 104 - benchmark/test_simple_run.py | 35 - .../tests/.claude-flow/metrics/performance.json | 2 +- .../tests/.claude-flow/metrics/task-metrics.json | 6 +- benchmark/tests/integration/test_integration.py | 2 +- claude-flow-wiki | 0 84 files changed, 861 insertions(+), 13596 deletions(-) "} diff --git a/benchmark/reports/metrics_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json b/benchmark/reports/metrics_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json new file mode 100644 index 0000000000..ea9375b46a --- /dev/null +++ b/benchmark/reports/metrics_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json @@ -0,0 +1,66 @@ +{ + "summary": { + "wall_clock_time": 1.3051128387451172, + "tasks_per_second": 0.7662172728003449, + "success_rate": 1.0, + "peak_memory_mb": 0.0, + "average_cpu_percent": 0.0 + }, + "performance": { + "average_duration": 0.0, + "median_duration": 0.0, + "p95_duration": 0.0, + "p99_duration": 0.0, + "total_cpu_seconds": 0.0 + }, + "resources": { + "memory": { + "peak_mb": 0.0, + "average_mb": 0.0 + }, + "cpu": { + "average_percent": 0.0, + "total_seconds": 0.0 + }, + "io": { + "disk_read_mb": 0.0, + "disk_write_mb": 0.0, + "network_sent_mb": 0.0, + "network_recv_mb": 0.0 + } + }, + "processes": { + "total": 1, + "peak_threads": 0, + "peak_fds": 0 + }, + "output": { + "total_size": 5, + "average_size": 5, + "complexity_score": 3.8310863640017243 + }, + "collectors": { + "performance": 1, + "resource": 1 + }, + "timestamp": "2025-08-06T01:51:49.030178", + "process_executions": { + "sparc:{\"positional\": [\"researcher\", \"Build a data processing pipeline\"]}": { + "command_type": "sparc", + "args": { + "positional": [ + "researcher", + "Build a data processing pipeline" + ] + }, + "execution_count": 1, + "success_count": 1, + "failure_count": 0, + "success_rate": 1.0, + "average_duration": 0.3032217025756836, + "total_duration": 0.3032217025756836, + "average_memory_mb": 41.881510416666664, + "peak_memory_mb": 69.9921875 + } + } +} \ No newline at end of file diff --git a/benchmark/reports/process_report_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json b/benchmark/reports/process_report_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json new file mode 100644 index 0000000000..5fc20a9408 --- /dev/null +++ b/benchmark/reports/process_report_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json @@ -0,0 +1,47 @@ +{ + "summary": { + "total_executions": 1, + "successful_executions": 1, + "failed_executions": 0, + "overall_success_rate": 1.0, + "total_duration": 0.3032217025756836, + "average_duration": 0.3032217025756836, + "peak_memory_mb": 69.9921875, + "average_memory_mb": 41.881510416666664, + "total_output_lines": 5, + "total_errors": 0 + }, + "command_statistics": { + "sparc:{\"positional\": [\"researcher\", \"Build a data processing pipeline\"]}": { + "command_type": "sparc", + "args": { + "positional": [ + "researcher", + "Build a data processing pipeline" + ] + }, + "execution_count": 1, + "success_count": 1, + "failure_count": 0, + "success_rate": 1.0, + "average_duration": 0.3032217025756836, + "total_duration": 0.3032217025756836, + "average_memory_mb": 41.881510416666664, + "peak_memory_mb": 69.9921875 + } + }, + "executions": [ + { + "command": "claude-flow sparc researcher Build a data processing pipeline", + "exit_code": 0, + "success": true, + "duration": 0.3032217025756836, + "start_time": 1754445105.722241, + "output_size": 5, + "error_count": 0, + "cpu_percent": 92.73333333333333, + "memory_mb": 41.881510416666664, + "peak_memory_mb": 69.9921875 + } + ] +} \ No newline at end of file diff --git a/benchmark/reports/swarm-research_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json b/benchmark/reports/swarm-research_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json new file mode 100644 index 0000000000..cb5d6dc74d --- /dev/null +++ b/benchmark/reports/swarm-research_cf23adca-8fd5-4ac4-b4e6-ea381673e853.json @@ -0,0 +1,136 @@ +{ + "id": "cf23adca-8fd5-4ac4-b4e6-ea381673e853", + "name": "swarm-research", + "description": "", + "status": "completed", + "config": { + "name": "swarm-research", + "description": "", + "strategy": "research", + "mode": "distributed", + "max_agents": 5, + "max_tasks": 100, + "timeout": 3600, + "task_timeout": 90, + "max_retries": 3, + "parallel": true, + "background": false, + "monitoring": true, + "quality_threshold": 0.8, + "resource_limits": { + "max_memory_mb": 1024, + "max_cpu_percent": 80, + "max_network_mbps": 100 + }, + "output_formats": [ + "json" + ], + "output_directory": "./reports", + "verbose": false + }, + "tasks": [ + { + "id": "0b2a8687-eb02-480e-b611-6c1673116e28", + "objective": "Build a data processing pipeline", + "description": "Benchmark task: Build a data processing pipeline", + "strategy": "research", + "mode": "distributed", + "parameters": {}, + "timeout": 90, + "max_retries": 3, + "priority": 1, + "status": "pending", + "created_at": "2025-08-06T01:51:45.721950", + "started_at": null, + "completed_at": null, + "duration": null, + "assigned_agents": [], + "parent_task_id": null, + "subtasks": [], + "dependencies": [] + } + ], + "results": [ + { + "id": "89f4dc5c-49ff-4a05-8b20-41d5b04699bc", + "task_id": "0b2a8687-eb02-480e-b611-6c1673116e28", + "agent_id": "claude-flow", + "status": "success", + "output": { + "raw_output": "\u274c SPARC configuration file (.roomodes) not found\nPlease ensure .roomodes file exists in: /workspaces/claude-code-flow/benchmark\n\nTo enable SPARC development modes, run:\n npx claude-flow@latest init --sparc", + "lines": [ + "\u274c SPARC configuration file (.roomodes) not found", + "Please ensure .roomodes file exists in: /workspaces/claude-code-flow/benchmark", + "", + "To enable SPARC development modes, run:", + " npx claude-flow@latest init --sparc" + ], + "sections": {} + }, + "errors": [], + "warnings": [], + "performance_metrics": { + "execution_time": 0.27387166023254395, + "queue_time": 0.0, + "throughput": 3.651345302215285, + "success_rate": 1.0, + "error_rate": 0.0, + "retry_count": 0, + "coordination_overhead": 0.0, + "communication_latency": 0.0 + }, + "quality_metrics": { + "accuracy_score": 1.0, + "completeness_score": 1.0, + "consistency_score": 0.0, + "relevance_score": 0.0, + "overall_quality": 1.0, + "review_score": null, + "automated_score": null + }, + "resource_usage": { + "cpu_percent": 92.73333333333333, + "memory_mb": 41.881510416666664, + "network_bytes_sent": 0, + "network_bytes_recv": 0, + "disk_bytes_read": 0, + "disk_bytes_write": 0, + "peak_memory_mb": 69.9921875, + "average_cpu_percent": 92.73333333333333 + }, + "execution_details": { + "command": "claude-flow sparc researcher Build a data processing pipeline", + "exit_code": 0, + "output_lines": 5, + "error_count": 0 + }, + "created_at": "2025-08-06T01:51:46.025836", + "started_at": "2025-08-06T01:51:45.722241", + "completed_at": "2025-08-06T01:51:46.025463", + "duration": 0.303222 + } + ], + "metrics": { + "total_tasks": 1, + "completed_tasks": 1, + "failed_tasks": 0, + "total_agents": 0, + "active_agents": 0, + "average_execution_time": 0.0, + "total_execution_time": 1.3051128387451172, + "success_rate": 1.0, + "throughput": 0.7662172728003449, + "resource_efficiency": 0.0, + "coordination_efficiency": 1.0, + "quality_score": 0.0, + "peak_memory_usage": 0.0, + "total_cpu_time": 0.0, + "network_overhead": 0.0 + }, + "created_at": "2025-08-06T01:51:45.721972", + "started_at": "2025-08-06T01:51:45.721975", + "completed_at": "2025-08-06T01:51:46.025851", + "duration": 0.303876, + "error_log": [], + "metadata": {} +} \ No newline at end of file diff --git a/benchmark/tests/integration/test_claude_optimizer.py b/benchmark/tests/integration/test_claude_optimizer.py index a4526133fd..73c7808b6d 100644 --- a/benchmark/tests/integration/test_claude_optimizer.py +++ b/benchmark/tests/integration/test_claude_optimizer.py @@ -9,7 +9,7 @@ import asyncio from pathlib import Path # Add benchmark source to path -sys.path.insert(0, str(Path(__file__).parent / "src")) +sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src")) from swarm_benchmark.claude_optimizer import ( ClaudeMdOptimizer,