feat(benchmark): 默认启用 Cosmos + Blob 导出
BENCHMARK_EXPORT_TARGET 默认值从 none 改为 cosmos,blob, 每次真实 run 终态自动落库。凭据未配置时降级 noop + warning,不影响主路径。 同步更新 ENV_VARS.md 默认值说明。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
521a227e58
commit
ffe9277050
@@ -125,8 +125,8 @@ def _build_target(target: str) -> Optional[MetricsExporter]:
|
||||
|
||||
|
||||
def get_exporters() -> List[MetricsExporter]:
|
||||
"""Parse BENCHMARK_EXPORT_TARGET (comma list) → exporters. Default → [NoopExporter]."""
|
||||
raw = (os.getenv("BENCHMARK_EXPORT_TARGET") or "none").strip().lower()
|
||||
"""Parse BENCHMARK_EXPORT_TARGET (comma list) → exporters. Default → cosmos,blob."""
|
||||
raw = (os.getenv("BENCHMARK_EXPORT_TARGET") or "cosmos,blob").strip().lower()
|
||||
targets = [t.strip() for t in raw.split(",") if t.strip()] or ["none"]
|
||||
exporters = [e for e in (_build_target(t) for t in targets) if e is not None]
|
||||
return exporters or [NoopExporter()]
|
||||
|
||||
+1
-1
@@ -231,7 +231,7 @@ Secret 解析优先级(`orchestrator/agent_launcher.py`):
|
||||
|
||||
| 变量名 | 默认值 | 说明 |
|
||||
|---|---|---|
|
||||
| `BENCHMARK_EXPORT_TARGET` | `none` | 导出目标:`none`(禁用)、`cosmos`(Azure Cosmos DB)、`blob`(Azure Blob)。 |
|
||||
| `BENCHMARK_EXPORT_TARGET` | `cosmos,blob` | 导出目标(逗号分隔可组合):`none`(禁用)、`cosmos`(Azure Cosmos DB)、`blob`(Azure Blob)。默认同时写入两者;凭据缺失时自动降级为 noop 并打 warning。 |
|
||||
| ⚠️ `BENCHMARK_COSMOS_CONNECTION_STRING` | — | Azure Cosmos DB 连接字符串。 |
|
||||
| `BENCHMARK_COSMOS_DATABASE` | `benchmark` | Cosmos 数据库名。 |
|
||||
| `BENCHMARK_COSMOS_CONTAINER` | `selfcert` | Cosmos 容器名。 |
|
||||
|
||||
Reference in New Issue
Block a user