From 185fbc4d22f58b8ea6ffdbd15da2e30d7cf5e1f7 Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 6 Aug 2025 11:52:43 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/benchmark/src/swarm=5Fbenchmark/cli/main.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/checkpoints/1754481137.json | 1 + .claude/checkpoints/1754481139.json | 1 + benchmark/src/swarm_benchmark/cli/main.py | 44 ++++++++++++++++++++--- 3 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .claude/checkpoints/1754481137.json create mode 100644 .claude/checkpoints/1754481139.json diff --git a/.claude/checkpoints/1754481137.json b/.claude/checkpoints/1754481137.json new file mode 100644 index 0000000000..9f685cd58f --- /dev/null +++ b/.claude/checkpoints/1754481137.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250806-115217", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/main.py", "timestamp": "2025-08-06T11:52:17Z", "type": "pre-edit", "original_branch": "alpha-88"} diff --git a/.claude/checkpoints/1754481139.json b/.claude/checkpoints/1754481139.json new file mode 100644 index 0000000000..e8a7b26d21 --- /dev/null +++ b/.claude/checkpoints/1754481139.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250806-115219", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/main.py", "timestamp": "2025-08-06T11:52:19Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 ++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +-- .claude/checkpoints/task-1754481099.json | 1 + benchmark/src/swarm_benchmark/cli/main.py | 64 +++++++++++++++++++++++++++++-- claude-flow-wiki | 0 6 files changed, 90 insertions(+), 7 deletions(-) "} diff --git a/benchmark/src/swarm_benchmark/cli/main.py b/benchmark/src/swarm_benchmark/cli/main.py index 296c21bfab..f76cdcc48b 100644 --- a/benchmark/src/swarm_benchmark/cli/main.py +++ b/benchmark/src/swarm_benchmark/cli/main.py @@ -434,11 +434,47 @@ def hive_mind(ctx, task, queen_type, max_workers, consensus, timeout, monitor, o result = executor.execute_hive_mind(config) if result.success: - click.echo(f"āœ… Hive-mind benchmark completed!") - click.echo(f"šŸ“Š Results saved to: {output_dir}") + # Generate detailed report + click.echo(f"\n{'='*60}") + click.echo(f"āœ… Hive-Mind Benchmark Completed!") + click.echo(f"{'='*60}") + + # Basic info + click.echo(f"šŸ“‹ Task: {task}") + click.echo(f"šŸ‘‘ Queen Type: {queen_type.upper()}") + click.echo(f"šŸ‘· Max Workers: {max_workers}") + click.echo(f"šŸ¤ Consensus: {consensus.upper()}") + + # Performance metrics + click.echo(f"\nšŸ“Š Performance Metrics:") + click.echo(f" ā±ļø Execution Time: {result.duration:.2f}s") + click.echo(f" šŸ¤– Agents Spawned: {result.agents_spawned}") + click.echo(f" āœ… Tasks Completed: {result.tasks_completed}") + if result.total_tokens > 0: + click.echo(f" šŸ”¤ Total Tokens: {result.total_tokens}") + click.echo(f" šŸ“„ Input: {result.input_tokens}") + click.echo(f" šŸ“¤ Output: {result.output_tokens}") + + # Save results + import json + from pathlib import Path + output_path = Path(output_dir) + output_path.mkdir(parents=True, exist_ok=True) + + timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") + results_file = output_path / f"hive_mind_{timestamp}.json" + + with open(results_file, 'w') as f: + json.dump(result.to_dict(), f, indent=2, default=str) + + click.echo(f"\nšŸ“ Output Files:") + click.echo(f" šŸ“„ Results: {results_file}") + if ctx.obj.get('verbose'): - click.echo(f"Execution time: {result.duration:.2f}s") - click.echo(f"Workers spawned: {result.agents_spawned}") + click.echo(f"\nšŸ” Command Executed:") + click.echo(f" {' '.join(result.command)}") + + click.echo(f"{'='*60}\n") else: error_msg = "" if result.errors: