跳到主要内容

Performance · 让每一次 Agent 调用可度量

Agent 调用延迟分解、增量计算 vs 全量重计算的实际成本对比、自动瓶颈检测、精细化资源计费——从 Agent proposal 到硅结果的完整性能链路追踪。

OBSERVABILITY P0 C++/Python
Performance Trace
# Every agent call, measured end-to-end
agent.call("iPL.place")  → 234ms total
  ├ schema_validation:   2ms
  ├ sandbox_setup:       5ms
  ├ tool_execution:    210ms  ← bottleneck
  └ result_serialize:   17ms
iMapsynthesisiFPfloorplaniPDNpoweriPLplacementiCTSclockiTOoptimizationiRTroutingiSTAtimingAiEDAdesign dataiPCLlayout modeliMapsynthesisiFPfloorplaniPDNpoweriPLplacementiCTSclockiTOoptimizationiRTroutingiSTAtimingAiEDAdesign dataiPCLlayout model

核心能力

Latency Tracking

Agent 每次工具调用的端到端延迟分解——schema 验证、沙箱设置、工具执行、结果序列化。每个环节的时间精确到毫秒,让平台团队快速定位性能热点。

Incremental Cost

增量计算 vs 全量重计算的实际成本对比。Agent 的 DirtySet 机制声称只重算被修改的区域——Performance 模块量化验证这一声明的实际收益,给 Agent 开发者提供真实的性价比数据。

Bottleneck Detection

自动识别流程中的性能瓶颈。统计 Agent 调用链中每个工具的平均耗时和方差,当某个工具的延迟显著高于基线时自动告警——让优化优先级一目了然。

Resource Accounting

CPU / 内存 / IO 的精细化计费。每个 Agent 会话消耗了多少计算资源都记录在案——既可以为成本优化提供依据,也可以为 Agent 之间的资源竞争提供公平调度参考。

Closed-loop Trace

从 Agent proposal 到硅结果的完整性能链路。一条流水线从问题识别开始,经过 proposal、evaluation、commit、到最终的硅验证——Performance 追踪每个步骤的耗时和资源消耗,形成完整的闭环画像。

性能追踪示例

from ieda import AgentClient
from ieda.performance import Trace, LatencyBreakdown

client = AgentClient(tracing=True)

# Run a full agent session with tracing
with Trace.session("timing_opt_v1") as trace:
    snap = client.call("iDB.snapshot", design=design)
    result = client.call("iSTA.analyze", snap=snap.id)
    proposal = client.call("iPL.optimize", timing=result)

# Get latency breakdown
breakdown = trace.breakdown()
for name, lat in breakdown.items():
    print(f"{name}: {lat.latency_ms}ms (cpu={lat.cpu_ms}ms, mem={lat.mem_mb}MB)")

# Detect bottlenecks
bottlenecks = trace.bottlenecks(threshold_pct=20)
for b in bottlenecks:
    print(f"Bottleneck: {b.tool} at {b.pct:.1f}% of session time")

# Incremental vs full cost comparison
cost = trace.compare(FullRecompute=snap.id)
print(f"Incremental: {cost.incremental_ms}ms vs Full: {cost.full_ms}ms")
print(f"Speedup: {cost.speedup:.1f}x")

Platform 总览

了解统一底座的五大模块如何协同工作。

Platform →

Agent Runtime

Agent 在平台中如何运行完整的探索-评估-提交循环。

更多 →

Evaluation

每次质量门禁的计算成本追踪。

Evaluation →