From adc684308028ef8ed9ccaa795a4eee486af2c472 Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 6 Aug 2025 01:22:38 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/benchmark/src/swarm=5Fbenchmark/automation/mo?= =?UTF-8?q?dels.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- benchmark/.claude/checkpoints/1754443356.json | 1 + benchmark/.claude/checkpoints/1754443357.json | 1 + .../src/swarm_benchmark/automation/models.py | 46 +++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 benchmark/.claude/checkpoints/1754443356.json create mode 100644 benchmark/.claude/checkpoints/1754443357.json create mode 100644 benchmark/src/swarm_benchmark/automation/models.py diff --git a/benchmark/.claude/checkpoints/1754443356.json b/benchmark/.claude/checkpoints/1754443356.json new file mode 100644 index 0000000000..9c58646195 --- /dev/null +++ b/benchmark/.claude/checkpoints/1754443356.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250806-012236", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/automation/models.py", "timestamp": "2025-08-06T01:22:36Z", "type": "pre-edit", "original_branch": "alpha-88"} diff --git a/benchmark/.claude/checkpoints/1754443357.json b/benchmark/.claude/checkpoints/1754443357.json new file mode 100644 index 0000000000..a891f46c8e --- /dev/null +++ b/benchmark/.claude/checkpoints/1754443357.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250806-012237", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/advanced_metrics/neural_benchmarks.py", "timestamp": "2025-08-06T01:22:37Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +- .../advanced_metrics/neural_benchmarks.py | 973 +++++++++++++++++++++ claude-flow-wiki | 0 4 files changed, 977 insertions(+), 4 deletions(-) "} diff --git a/benchmark/src/swarm_benchmark/automation/models.py b/benchmark/src/swarm_benchmark/automation/models.py new file mode 100644 index 0000000000..e498fbf2c6 --- /dev/null +++ b/benchmark/src/swarm_benchmark/automation/models.py @@ -0,0 +1,46 @@ +""" +Models for automation module. + +Defines data structures used throughout the automation components. +""" + +from dataclasses import dataclass, field +from datetime import datetime +from typing import Dict, Any, Optional +from enum import Enum + + +class TaskStatus(Enum): + """Status of benchmark tasks.""" + PENDING = "pending" + RUNNING = "running" + COMPLETED = "completed" + FAILED = "failed" + CANCELLED = "cancelled" + TIMEOUT = "timeout" + + +@dataclass +class BenchmarkTask: + """A benchmark task to be executed.""" + id: str + name: str + description: str + type: str = "generic" + parameters: Dict[str, Any] = field(default_factory=dict) + priority: int = 5 # 1-10, higher is more priority + timeout: Optional[int] = None # seconds + dependencies: list = field(default_factory=list) + created_at: datetime = field(default_factory=datetime.now) + + +@dataclass +class BenchmarkResult: + """Result of a benchmark task execution.""" + task_id: str + status: str + execution_time: float + metrics: Dict[str, Any] = field(default_factory=dict) + timestamp: datetime = field(default_factory=datetime.now) + error_message: Optional[str] = None + output: Optional[str] = None \ No newline at end of file