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

rUv241780df63dd
diff --git a/.claude/checkpoints/1754488763.json b/.claude/checkpoints/1754488763.json
new file mode 100644
index 0000000000..9079410daa
--- /dev/null
+++ b/.claude/checkpoints/1754488763.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250806-135923", "file": "/workspaces/claude-code-flow/user-service/src/utils/logger.ts", "timestamp": "2025-08-06T13:59:23Z", "type": "pre-edit", "original_branch": "alpha-88"}
diff --git a/.claude/checkpoints/1754488765.json b/.claude/checkpoints/1754488765.json
new file mode 100644
index 0000000000..d217775685
--- /dev/null
+++ b/.claude/checkpoints/1754488765.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250806-135925", "file": "/workspaces/claude-code-flow/user-service/src/utils/logger.ts", "timestamp": "2025-08-06T13:59:25Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 2428 +--------------------- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754488749.json | 1 + .claude/checkpoints/1754488750.json | 1 + benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +- claude-flow-wiki | 0 user-service/src/utils/logger.ts | 48 + 9 files changed, 84 insertions(+), 2410 deletions(-) "}
diff --git a/benchmark/src/swarm_benchmark/cli/main.py b/benchmark/src/swarm_benchmark/cli/main.py
index 76536fa41f..0eb37a0915 100644
--- a/benchmark/src/swarm_benchmark/cli/main.py
+++ b/benchmark/src/swarm_benchmark/cli/main.py
@@ -768,8 +768,57 @@ async def _run_real_benchmark(objective: str, config: BenchmarkConfig,
def _get_recent_benchmarks(filter_strategy=None, filter_mode=None, limit=10):
"""Get recent benchmark runs."""
- # TODO: Implement database query
- return []
+ import os
+ from pathlib import Path
+ import json
+
+ # Look for benchmark files in the reports directory
+ reports_dir = Path('./reports')
+ if not reports_dir.exists():
+ return []
+
+ benchmarks = []
+
+ # Find all JSON files that look like benchmark results
+ for file_path in reports_dir.glob('*.json'):
+ # Skip metrics and process report files
+ if 'metrics_' in file_path.name or 'process_report_' in file_path.name:
+ continue
+
+ try:
+ with open(file_path, 'r') as f:
+ data = json.load(f)
+
+ # Extract benchmark info
+ benchmark_info = {
+ 'id': file_path.stem,
+ 'file': str(file_path),
+ 'timestamp': file_path.stat().st_mtime,
+ 'name': data.get('name', file_path.stem),
+ 'strategy': data.get('strategy', 'unknown'),
+ 'mode': data.get('mode', 'unknown'),
+ 'objective': data.get('objective', data.get('description', 'N/A')),
+ 'success': data.get('success', False),
+ 'duration': data.get('duration', 0)
+ }
+
+ # Apply filters if provided
+ if filter_strategy and benchmark_info['strategy'].lower() != filter_strategy.lower():
+ continue
+ if filter_mode and benchmark_info['mode'].lower() != filter_mode.lower():
+ continue
+
+ benchmarks.append(benchmark_info)
+
+ except Exception as e:
+ # Skip files that can't be parsed
+ continue
+
+ # Sort by timestamp (most recent first)
+ benchmarks.sort(key=lambda x: x['timestamp'], reverse=True)
+
+ # Limit results
+ return benchmarks[:limit]
def _get_benchmark_details(benchmark_id: str):