Skip to content

feat(console): 在工具调用统计表中增加总耗时列 (#86)#114

Merged
SunYanbox merged 1 commit intodevelopfrom
feat/86-show-cumulative-total-invocation-time-per-tool-under-top-tools-table-not-just-average-latency
May 3, 2026
Merged

feat(console): 在工具调用统计表中增加总耗时列 (#86)#114
SunYanbox merged 1 commit intodevelopfrom
feat/86-show-cumulative-total-invocation-time-per-tool-under-top-tools-table-not-just-average-latency

Conversation

@SunYanbox
Copy link
Copy Markdown
Owner

  • 新增功能: 扩展 get_tool_usage_ranking API 返回数据维度
    • 数据库查询逻辑更新,SQL 语句新增 SUM(duration_ms) as total_dur 聚合计算
    • API 返回值元组结构由 (func_name, call_count, avg_duration_ms) 变更为包含第四个元素 total_duration_ms
  • 重构优化: 同步更新 UI 展示层以适配新数据结构
    • src/console/ui/widgets/stats_tab.pyDataTable 列定义增加 "Total Time"
    • 渲染循环解包逻辑调整为接收 total_dur 参数并格式化显示为毫秒字符串

- 新增功能: 扩展 `get_tool_usage_ranking` API 返回数据维度
  * 数据库查询逻辑更新,SQL 语句新增 `SUM(duration_ms) as total_dur` 聚合计算
  * API 返回值元组结构由 `(func_name, call_count, avg_duration_ms)` 变更为包含第四个元素 `total_duration_ms`
- 重构优化: 同步更新 UI 展示层以适配新数据结构
  * `src/console/ui/widgets/stats_tab.py` 中 `DataTable` 列定义增加 "Total Time"
  * 渲染循环解包逻辑调整为接收 `total_dur` 参数并格式化显示为毫秒字符串
@SunYanbox SunYanbox added the enhancement New feature or request label May 3, 2026
@SunYanbox SunYanbox merged commit 08965f1 into develop May 3, 2026
3 checks passed
@SunYanbox SunYanbox deleted the feat/86-show-cumulative-total-invocation-time-per-tool-under-top-tools-table-not-just-average-latency branch May 3, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

1 participant