Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

πŸ”– Checkpoint: Edit /workspaces/claude-code-flow/benchmark/src/swarm_benchmark/cli/main.py

rUvc65358dd3197
diff --git a/.claude/checkpoints/task-1754481099.json b/.claude/checkpoints/task-1754481099.json
new file mode 100644
index 0000000000..815db0b6a0
--- /dev/null
+++ b/.claude/checkpoints/task-1754481099.json
@@ -0,0 +1 @@
+{"checkpoint": "task-20250806-115138", "task": "can i improve the report to include the refernce to the file and details? @ruvnet ➜ /workspaces/cl", "timestamp": "2025-08-06T11:51:39Z", "commit": "c652668c0d4041b6ef3d488f5b3139f05376b8e1", "github_release": "true"}
diff --git a/benchmark/src/swarm_benchmark/cli/main.py b/benchmark/src/swarm_benchmark/cli/main.py
index 211cbae4d1..296c21bfab 100644
--- a/benchmark/src/swarm_benchmark/cli/main.py
+++ b/benchmark/src/swarm_benchmark/cli/main.py
@@ -305,10 +305,68 @@ def swarm(ctx, objective, strategy, mode, sparc_mode, all_modes, max_agents, tim
result = asyncio.run(_run_real_benchmark(objective, config, sparc_mode, all_modes))
if result:
- click.echo(f"βœ… Real benchmark completed successfully!")
- click.echo(f"πŸ“Š Results saved to: {output_dir}")
+ # Generate detailed report
+ click.echo(f"\n{'='*60}")
+ click.echo(f"βœ… Real Benchmark Completed Successfully!")
+ click.echo(f"{'='*60}")
+
+ # Basic info
+ click.echo(f"πŸ“‹ Objective: {objective}")
+ click.echo(f"🎯 Strategy: {strategy.upper()}")
+ click.echo(f"πŸ”„ Mode: {mode.upper()}")
+
+ # Metrics if available
+ if 'metrics' in result:
+ metrics = result['metrics']
+ click.echo(f"\nπŸ“Š Performance Metrics:")
+ if 'wall_clock_time' in metrics:
+ click.echo(f" ⏱️ Execution Time: {metrics['wall_clock_time']:.2f}s")
+ if 'tasks_per_second' in metrics:
+ click.echo(f" ⚑ Tasks/Second: {metrics['tasks_per_second']:.2f}")
+ if 'success_rate' in metrics:
+ click.echo(f" βœ“ Success Rate: {metrics['success_rate']:.1%}")
+ if 'peak_memory_mb' in metrics:
+ click.echo(f" πŸ’Ύ Peak Memory: {metrics['peak_memory_mb']:.1f} MB")
+ if 'average_cpu_percent' in metrics:
+ click.echo(f" πŸ–₯️ Avg CPU: {metrics['average_cpu_percent']:.1f}%")
+
+ # File outputs
+ import os
+ from pathlib import Path
+ output_path = Path(output_dir)
+ output_path.mkdir(parents=True, exist_ok=True)
+
+ benchmark_id = result.get('benchmark_id', 'latest')
+
+ click.echo(f"\nπŸ“ Output Files:")
+
+ # Main results file
+ results_file = output_path / f"benchmark_{benchmark_id}.json"
+ click.echo(f" πŸ“„ Results: {results_file}")
+
+ # Save results
+ import json
+ with open(results_file, 'w') as f:
+ json.dump(result, f, indent=2, default=str)
+
+ # Check for additional files
+ metrics_file = output_path / f"metrics_{benchmark_id}.json"
+ if metrics_file.exists():
+ click.echo(f" πŸ“Š Metrics: {metrics_file}")
+
+ process_file = output_path / f"process_report_{benchmark_id}.json"
+ if process_file.exists():
+ click.echo(f" πŸ”„ Process Report: {process_file}")
+
+ # Summary
+ click.echo(f"\nπŸ“ˆ Summary:")
+ click.echo(f" {result.get('summary', 'Benchmark completed successfully')}")
+
if ctx.obj.get('verbose'):
- click.echo(f"πŸ“‹ Summary: {result.get('summary', 'N/A')}")
+ click.echo(f"\nπŸ” Detailed Results:")
+ click.echo(json.dumps(result.get('metrics', {}), indent=2, default=str))
+
+ click.echo(f"{'='*60}\n")
else:
click.echo("❌ Real benchmark failed!")
return 1