diff --git a/.claude/checkpoints/1754480400.json b/.claude/checkpoints/1754480400.json new file mode 100644 index 0000000000..93e91ae3e1 --- /dev/null +++ b/.claude/checkpoints/1754480400.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250806-114000", "file": "/workspaces/claude-code-flow/benchmark/test_swarm.py", "timestamp": "2025-08-06T11:40:00Z", "type": "pre-edit", "original_branch": "alpha-88"} diff --git a/.claude/checkpoints/1754480402.json b/.claude/checkpoints/1754480402.json new file mode 100644 index 0000000000..d59ce2b41a --- /dev/null +++ b/.claude/checkpoints/1754480402.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250806-114002", "file": "/workspaces/claude-code-flow/benchmark/test_swarm.py", "timestamp": "2025-08-06T11:40:02Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 36 +++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++-- .claude/checkpoints/1754480376.json | 1 + .claude/checkpoints/1754480377.json | 1 + .../real_benchmark_engine.cpython-312.pyc | Bin 14056 -> 14714 bytes benchmark/test_swarm.py | 27 ++++++++++++++++ claude-flow-wiki | 0 8 files changed, 69 insertions(+), 4 deletions(-) "} diff --git a/benchmark/src/swarm_benchmark/core/real_benchmark_engine.py b/benchmark/src/swarm_benchmark/core/real_benchmark_engine.py index 6a9e140c2a..3eae951fc0 100644 --- a/benchmark/src/swarm_benchmark/core/real_benchmark_engine.py +++ b/benchmark/src/swarm_benchmark/core/real_benchmark_engine.py @@ -280,8 +280,8 @@ class RealBenchmarkEngine(BenchmarkEngine): if hasattr(self, 'metrics_aggregator'): self.metrics_aggregator.stop_collection() - # Clean up any process trackers - if hasattr(self, 'process_tracker'): + # Clean up any process trackers if they have cleanup method + if hasattr(self, 'process_tracker') and hasattr(self.process_tracker, 'cleanup'): self.process_tracker.cleanup() # Any other cleanup needed diff --git a/reports/metrics_8a5494dd-6ed3-45a8-b047-9560a1326912.json b/reports/metrics_8a5494dd-6ed3-45a8-b047-9560a1326912.json new file mode 100644 index 0000000000..8ba25f429d --- /dev/null +++ b/reports/metrics_8a5494dd-6ed3-45a8-b047-9560a1326912.json @@ -0,0 +1,66 @@ +{ + "summary": { + "wall_clock_time": 1.3061041831970215, + "tasks_per_second": 0.765635707216132, + "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": 1, + "average_size": 1, + "complexity_score": 0.765635707216132 + }, + "collectors": { + "performance": 1, + "resource": 1 + }, + "timestamp": "2025-08-06T11:40:11.600186", + "process_executions": { + "sparc:{\"positional\": [\"coder\", \"echo hello\"]}": { + "command_type": "sparc", + "args": { + "positional": [ + "coder", + "echo hello" + ] + }, + "execution_count": 1, + "success_count": 1, + "failure_count": 0, + "success_rate": 1.0, + "average_duration": 0.3037898540496826, + "total_duration": 0.3037898540496826, + "average_memory_mb": 40.891927083333336, + "peak_memory_mb": 67.0546875 + } + } +} \ No newline at end of file diff --git a/reports/process_report_8a5494dd-6ed3-45a8-b047-9560a1326912.json b/reports/process_report_8a5494dd-6ed3-45a8-b047-9560a1326912.json new file mode 100644 index 0000000000..95f03e66c3 --- /dev/null +++ b/reports/process_report_8a5494dd-6ed3-45a8-b047-9560a1326912.json @@ -0,0 +1,47 @@ +{ + "summary": { + "total_executions": 1, + "successful_executions": 1, + "failed_executions": 0, + "overall_success_rate": 1.0, + "total_duration": 0.3037898540496826, + "average_duration": 0.3037898540496826, + "peak_memory_mb": 67.0546875, + "average_memory_mb": 40.891927083333336, + "total_output_lines": 1, + "total_errors": 1 + }, + "command_statistics": { + "sparc:{\"positional\": [\"coder\", \"echo hello\"]}": { + "command_type": "sparc", + "args": { + "positional": [ + "coder", + "echo hello" + ] + }, + "execution_count": 1, + "success_count": 1, + "failure_count": 0, + "success_rate": 1.0, + "average_duration": 0.3037898540496826, + "total_duration": 0.3037898540496826, + "average_memory_mb": 40.891927083333336, + "peak_memory_mb": 67.0546875 + } + }, + "executions": [ + { + "command": "claude-flow sparc coder echo hello", + "exit_code": 0, + "success": true, + "duration": 0.3037898540496826, + "start_time": 1754480408.2914956, + "output_size": 1, + "error_count": 1, + "cpu_percent": 92.76666666666667, + "memory_mb": 40.891927083333336, + "peak_memory_mb": 67.0546875 + } + ] +} \ No newline at end of file diff --git a/reports/real-benchmark-development-centralized_8a5494dd-6ed3-45a8-b047-9560a1326912.json b/reports/real-benchmark-development-centralized_8a5494dd-6ed3-45a8-b047-9560a1326912.json new file mode 100644 index 0000000000..02dcc3c39e --- /dev/null +++ b/reports/real-benchmark-development-centralized_8a5494dd-6ed3-45a8-b047-9560a1326912.json @@ -0,0 +1,132 @@ +{ + "id": "8a5494dd-6ed3-45a8-b047-9560a1326912", + "name": "real-benchmark-development-centralized", + "description": "Real Benchmark: echo hello", + "status": "completed", + "config": { + "name": "real-benchmark-development-centralized", + "description": "Real Benchmark: echo hello", + "strategy": "development", + "mode": "centralized", + "max_agents": 5, + "max_tasks": 100, + "timeout": 60, + "task_timeout": 300, + "max_retries": 3, + "parallel": false, + "background": false, + "monitoring": false, + "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": "15786740-1230-492a-8cea-40e496aace85", + "objective": "echo hello", + "description": "Benchmark task: echo hello", + "strategy": "development", + "mode": "centralized", + "parameters": {}, + "timeout": 300, + "max_retries": 3, + "priority": 1, + "status": "pending", + "created_at": "2025-08-06T11:40:08.290934", + "started_at": null, + "completed_at": null, + "duration": null, + "assigned_agents": [], + "parent_task_id": null, + "subtasks": [], + "dependencies": [] + } + ], + "results": [ + { + "id": "ec7231dd-a60d-463e-ad93-3afe95ae458a", + "task_id": "15786740-1230-492a-8cea-40e496aace85", + "agent_id": "claude-flow", + "status": "success", + "output": { + "raw_output": "\u274c Failed to run SPARC mode: Deno is not defined", + "lines": [ + "\u274c Failed to run SPARC mode: Deno is not defined" + ], + "sections": {} + }, + "errors": [], + "warnings": [], + "performance_metrics": { + "execution_time": 0.2764711380004883, + "queue_time": 0.0, + "throughput": 3.6170140841183716, + "success_rate": 1.0, + "error_rate": 0.0, + "retry_count": 0, + "coordination_overhead": 0.0, + "communication_latency": 0.0 + }, + "quality_metrics": { + "accuracy_score": 0.0, + "completeness_score": 1.0, + "consistency_score": 0.0, + "relevance_score": 0.0, + "overall_quality": 0.5, + "review_score": null, + "automated_score": null + }, + "resource_usage": { + "cpu_percent": 92.76666666666667, + "memory_mb": 40.891927083333336, + "network_bytes_sent": 0, + "network_bytes_recv": 0, + "disk_bytes_read": 0, + "disk_bytes_write": 0, + "peak_memory_mb": 67.0546875, + "average_cpu_percent": 92.76666666666667 + }, + "execution_details": { + "command": "claude-flow sparc coder echo hello", + "exit_code": 0, + "output_lines": 1, + "error_count": 1 + }, + "created_at": "2025-08-06T11:40:08.595744", + "started_at": "2025-08-06T11:40:08.291496", + "completed_at": "2025-08-06T11:40:08.595285", + "duration": 0.303789 + } + ], + "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.3061041831970215, + "success_rate": 1.0, + "throughput": 0.765635707216132, + "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-06T11:40:08.290959", + "started_at": "2025-08-06T11:40:08.290965", + "completed_at": "2025-08-06T11:40:08.595765", + "duration": 0.3048, + "error_log": [], + "metadata": {} +} \ No newline at end of file