当前位置: 首页 > article >正文

Copilot量化指标参数及其方法

快速预览:此文列出了 GitHub Copilot Metrics API 提供的指标列表,其中核心的量化指标包括活动用户数接受率交互次数分析。同时,本文还介绍了市面上的 Dashboard 工具,以及这些工具中突出展示的指标。这些 Dashboard 更加注重展示指标随时间变化的趋势。

GitHub Copilot Metrics API 接口及其数据列表

范围包括:组织/企业/团队/个人 数据有效期:28天

Github Copilot Metrics API:

可获取的数据:

字段路径

含义

date

数据的日期。

total_active_users

在指定日期内活跃的用户总数。

total_engaged_users

在指定日期内参与使用 GitHub Copilot 的用户总数。

copilot_ide_code_completions

在 IDE 中的代码补全相关数据。

copilot_ide_code_completions.total_engaged_users

参与代码补全功能的用户总数。

copilot_ide_code_completions.languages

按编程语言细分的代码补全数据。

copilot_ide_code_completions.languages.name

编程语言的名称。

copilot_ide_code_completions.languages

.total_engaged_users

使用该编程语言进行代码补全的用户数。

copilot_ide_code_completions.editors

按编辑器细分的代码补全数据。

copilot_ide_code_completions.editors.name

编辑器的名称。

copilot_ide_code_completions.editors

.total_engaged_users

使用该编辑器进行代码补全的用户数。

copilot_ide_code_completions.editors.models

按模型细分的代码补全数据。

copilot_ide_code_completions.editors.models.name

模型的名称。

copilot_ide_code_completions.editors.models

.is_custom_model

是否为自定义模型。

copilot_ide_code_completions.editors

.models.custom_model_training_date

自定义模型的训练日期(如果适用)。

copilot_ide_code_completions.editors

.models

.total_engaged_users

使用该模型进行代码补全的用户数。

copilot_ide_code_completions.editors

.models.languages

按编程语言细分的代码补全数据。

copilot_ide_code_completions.editors

.models.languages.name

编程语言的名称。

copilot_ide_code_completions.editors.models

.languages.total_engaged_users

使用该编程语言和模型进行代码补全的用户数。

copilot_ide_code_completions.editors

.models.languages

.total_code_suggestions

该编程语言和模型提供的代码建议总数。

copilot_ide_code_completions.editors.models.languages

.total_code_acceptances

用户接受的代码建议总数。

copilot_ide_code_completions.editors.models

.languages.total_code_lines_suggested

该编程语言和模型建议的代码行数。

copilot_ide_code_completions.editors.models

.languages.total_code_lines_accepted

用户接受的代码行数。

copilot_ide_chat

在 IDE 中的 Chat 功能相关数据。

copilot_ide_chat.total_engaged_users

参与 Chat 功能的用户总数。

copilot_ide_chat.editors

按编辑器细分的 Chat 数据。

copilot_ide_chat.editors.name

编辑器的名称。

copilot_ide_chat.editors.total_engaged_users

使用该编辑器进行 Chat 的用户数。

copilot_ide_chat.editors.models

按模型细分的 Chat 数据。

copilot_ide_chat.editors.models.name

模型的名称。

copilot_ide_chat.editors.models.is_custom_model

是否为自定义模型。

copilot_ide_chat.editors

.models.custom_model_training_date

自定义模型的训练日期(如果适用)。

copilot_ide_chat.editors.models.total_engaged_users

使用该模型进行 Chat 的用户数。

copilot_ide_chat.editors.models.total_chats

该模型的 Chat 会话总数。

copilot_ide_chat.editors.models

.total_chat_insertion_events

用户插入 Chat 建议的事件总数。

copilot_ide_chat.editors.models

.total_chat_copy_events

用户复制 Chat 建议的事件总数。

copilot_dotcom_chat

在 GitHub.com 上的 Chat 功能相关数据。

copilot_dotcom_chat.total_engaged_users

参与 Chat 功能的用户总数。

copilot_dotcom_chat.models

按模型细分的 Chat 数据。

copilot_dotcom_chat.models.name

模型的名称。

copilot_dotcom_chat.models.is_custom_model

是否为自定义模型。

copilot_dotcom_chat.models

.custom_model_training_date

自定义模型的训练日期(如果适用)。

copilot_dotcom_chat.models.total_engaged_users

使用该模型进行 Chat 的用户数。

copilot_dotcom_chat.models.total_chats

该模型的 Chat 会话总数。

copilot_dotcom_pull_requests

在 GitHub.com 上的 Pull Request 功能相关数据。

copilot_dotcom_pull_requests.total_engaged_users

参与 Pull Request 功能的用户总数。

copilot_dotcom_pull_requests.repositories

按仓库细分的 Pull Request 数据。

copilot_dotcom_pull_requests.repositories.name

仓库的名称。

copilot_dotcom_pull_requests

.repositories.total_engaged_users

在该仓库中参与 Pull Request 功能的用户数。

copilot_dotcom_pull_requests.repositories.models

按模型细分的 Pull Request 数据。

copilot_dotcom_pull_requests.repositories.models.name

模型的名称。

copilot_dotcom_pull_requests.repositories.models

.is_custom_model

是否为自定义模型。

copilot_dotcom_pull_requests.repositories.models

.custom_model_training_date

自定义模型的训练日期(如果适用)。

copilot_dotcom_pull_requests.repositories.models

.total_pr_summaries_created

该模型创建的 Pull Request 摘要总数。

copilot_dotcom_pull_requests

.repositories.models

.total_engaged_users

使用该模型进行 Pull Request 功能的用户数。

Seat Metrics API

  • 接口: GET /orgs/{org}/copilot/seats/metrics
  • 可获取的数据(仅列出可量化的核心指标,更多参数可访问超链接)
    • total_assigned: 总共分配的 Copilot 人数
    • assigned_but_never_used: 分配但从未使用的人数
    • no_activity_in_last_7_days: 过去 7 天内无活动的人数

量化使用情况的核心指标

通过 Copilot Metrics API 获取的数据,可以从多个维度分析使用情况:

  1. 用户活跃度
    • 活动用户数(total_active_users):每日者数量,反映工具的基本采用率。
    • 参与用户数(total_engaged_users):深度使用 Copilot 功能的用户(如代码补全、聊天交互)。
    • 趋势分析:通过 API 的 28 天数据,观察用户数的周/月变化。
  2. 功能使用细分
    • 代码补全(copilot_ide_code_completions):统计接受率(total_code_acceptances / total_code_suggestions)。
    • 聊天功能(copilot_ide_chat):分析交互次数(total_chats)及事件(如代码插入或复制),评估开发者对 AI 辅助的依赖程度。
    • IDE 和语言分布:通过 editors  languages 字段,识别团队开发环境及常用编程语言,优化工具适配。
  3. 团队与组织级指标
    • 按团队或企业划分数据,对比不同部门的采用率和功能使用差异,发现潜在培训需求。
    • 若某团队每日活跃用户低于 5 人,API 将不返回数据,需结合其他方式补充分析。

二、评估生产力提升的方法

生产力的提升需结合量化数据与定性分析:

  1. 效率指标
    • 代码行生成效率:通过 total_code_lines_suggested  total_code_lines_accepted 计算代码接受率,衡量 Copilot 减少重复编码的效果。
    • 任务完成时间:对比使用 Copilot 前后,相同类型任务的平均开发时长(需结合外部时间追踪工具)。
  2. 代码质量与维护性
    • 分析代码补全的接受率与错误率(如后续测试中发现的缺陷),评估生成代码的可靠性。
    • 通过 copilot_dotcom_pull_requests 中的 PR 摘要生成情况,判断 Copilot 是否加速了代码审查流程。
  3. 开发者反馈与行为分析
    • 定期调查开发者对 Copilot 的主观体验(如节省时间、减少认知负荷)。

三、数据存储与长期趋势分析

  • 存储策略:使用脚本每日调用 API 并保存至本地 JSON 文件或数据库,避免受限于 28 天的数据保留期。
  • 可视化工具:生成趋势图表(如周均活跃用户、代码接受率变化)。

可视化工具

1. 使用 GitHub Copilot Metrics Dashboard

GitHub 提供了一个 Metrics Dashboard,可以可视化展示 GitHub Copilot 的使用情况。这个工具可以帮助你:

  • 查看活跃用户数和采纳率
  • 分析代码补全和 Chat 交互的接受率
  • 按语言和编辑器细分数据

更多详情请参考:GitHub Copilot Metrics Dashboard

2. 使用 Power BI 应用

GitHub 提供了一个 Power BI 应用,可以用来监控和分析 GitHub Copilot 的使用情况。这个应用提供了以下功能:

  • 可视化用户参与度
  • 分析代码补全和 Chat 交互的接受率
  • 自定义视图和过滤器

更多详情请参考访问 GitHub Copilot Metrics - Power BI 应用 。

3.其他非官方dashboard,如copilot-metrics-viewer

突出以下指标:

  • Acceptance Rate(接受率):此指标表示 GitHub Copilot 建议的代码行和建议中被接受的比例。该比率是 Copilot 建议的相关性和有用性的指标。然而,与任何指标一样,使用时应谨慎,因为开发人员以多种方式使用 Copilot(研究、确认、验证等,不总是“注入”)。
  • Total Suggestions(建议总数):此图表展示了 GitHub Copilot 提出的代码建议总数。它提供了工具活动和用户参与度随时间变化的视图。
  • Total Acceptances(接受总数):此可视化聚焦于用户接受的建议总数。
  • Total Lines Suggested(建议行数):展示了 GitHub Copilot 建议的代码行数。这给出了代码生成和辅助提供的数量的概念。
  • Total Lines Accepted(接受行数):顾名思义,展示了用户接受的代码行数(完全接受),提供了对建议代码实际被利用和整合到代码库中的洞察。
  • Total Active Users(活跃用户总数):表示与 GitHub Copilot 互动的活跃用户数量。这有助于了解用户群的增长和采用率。


http://www.kler.cn/a/536554.html

相关文章:

  • DeepSeek 模型发展脉络全解析
  • NetCore Consul动态伸缩+Ocelot 网关 缓存 自定义缓存 + 限流、熔断、超时 等服务治理
  • DeepSeek LLM(初代)阅读报告
  • 【BUUCTF逆向题】[MRCTF2020]Transform
  • MySQL万能备份脚本
  • Verilog基础(一):基础元素
  • 37构造回文字符串问题-青训营刷题
  • 蓝桥杯小白打卡第四天
  • [Day 16]螺旋遍历二维数组
  • 解决react中函数式组件usestate异步更新
  • AI驱动的智能流程自动化是什么
  • python绘图(1)
  • 持仓与感悟记录
  • ComfyUI 安装教程:macOS 和 Linux 统一步骤
  • 《解锁GANs黑科技:打造影视游戏的逼真3D模型》
  • idea通过codeGPT插件集成DeepSeek
  • Ollama python交互:chat+embedding实践
  • JMeter通过BeanShell创建CSV文件
  • 【Block总结】PSA,金字塔挤压注意力,解决传统注意力机制在捕获多尺度特征时的局限性
  • Linux 系统无法启动的排查与修复方法
  • Kotlin 循环与函数详解:高效编程指南
  • 亚博microros小车-原生ubuntu支持系列:23 人脸识别追踪
  • [论文笔记] GRPO DPO
  • Kubernetes是什么?为什么它是云原生的基石
  • Amazon Aurora Serverless
  • react面试题三