Skip to main content

Viewing GitHub Actions metrics for your organization

GitHub Actions metrics provide insights into how and where your organization is using resources for its CI/CD pipelines.

谁可以使用此功能?

Organization owners and users with the "View organization Actions metrics" permission.

About GitHub Actions metrics

GitHub Actions metrics provide insights into how your workflows and jobs are performing at the organization and repository levels. There are two types of metrics to help you analyze different aspects of your workflows:

  • GitHub Actions usage metrics: Usage metrics help you track how many minutes your workflows and jobs consume. You can use this data to understand the cost of running Actions and ensure you're staying within your plan limits. This is especially useful for identifying high-usage workflows or repositories.
  • GitHub Actions performance metrics: Performance metrics focus on the efficiency and reliability of your workflows and jobs. With performance metrics, you can monitor key indicators like job run times, queue times, and failure rates to identify bottlenecks, slow-running jobs, or frequently failing workflows.

Enabling access to GitHub Actions metrics

Organization owners can create custom organization roles to allow people to view GitHub Actions usage metrics for their organization. To provide users with access, select the "View organization Actions metrics" role when creating a custom organization role. For more information, see "关于自定义组织角色."

About GitHub Actions usage metrics

GitHub Actions 使用指标让你可以分析所在组织如何使用“操作”分钟。 可以查看与以下各项相关的使用情况信息:

  • 工作流。 查看组织中每个工作流的用法数据,并利用这些信息发现优化机会,例如,重构某个工作流或使用 大型运行器。
  • 作业****。 查看哪些作业是资源密集型作业及其运行位置。
  • 存储库。 获取组织中每个存储库的高级快照及其操作分钟使用量。
  • 运行时 OS。 了解每个操作系统的运行程序如何使用“操作”分钟数,以及工作流最常运行的操作系统类型。
  • 运行程序类型。 比较自承载运行程序和 GitHub 托管的运行程序如何使用“操作”分钟数,以及每种运行程序类型的工作流运行量。

GitHub Actions 使用指标不对显示的指标应用分钟乘数。 虽然_可_帮助你了解自己的账单,但其主要用途是帮助你了解组织中“操作”分钟的方式和位置。

有关分钟乘数的详细信息,请参阅“关于 GitHub Actions 的计费”。

About GitHub Actions performance metrics

Note

GitHub Actions performance metrics is currently in 公共预览版 and subject to change.

GitHub Actions performance metrics enables you to analyze the efficiency and reliability of your workflows. You can view performance information such as average run times, average queue times, and failure rates, related to:

  • Workflows. View performance data for each workflow in your organization, including average run time and job failures. Use this information to identify inefficient workflows and run stability.
  • Jobs. View performance data for each individual job to, including average run time, average queue time, and job failures. Use this information to identify inefficient jobs.
  • Repositories. Get a high-level snapshot of each repository in your organization and their average performance metrics.
  • Runtime OS. Understand how runners for each operating system are performing.
  • Runner type. Compare the performance of self-hosted runners and GitHub-hosted runners, to make decisions about runner types.

Understanding GitHub Actions metrics aggregation

使用时间段选择功能可以查看预定义时间段内的 GitHub Actions 使用指标,如下表所述。 这些指标包括跳过的运行和使用零分钟的运行。 数据使用协调世界时 (UTC) 天显示。

时间段说明
本周(周一至周日)从星期一到页面查看当天的数据。
本月从当月第一天到页面查看当天的数据。
上个月上月第一天至最后一天的数据。
最近 30 天从过去 30 天到查看页面时的数据。
过去 90 天从过去 90 天到查看页面时的数据。
去年过去 12 个月聚合的数据。

Viewing GitHub Actions metrics for your organization

Note

There may be a discrepancy between the Workflows tab's job count and the Jobs tab's count due to differences in how unique jobs are identified. This does not affect the total minutes calculated.

  1. 在 GitHub 的右上角,选择个人资料照片,然后单击 你的组织”。

  2. 单击您的组织名称。

  3. 在组织名称下,单击“ 见解”。

    组织的水平导航栏的屏幕截图。 标有图标和“见解”的选项卡以深橙色标出。

  4. In the "Insights" navigation menu, click Actions Usage Metrics or click Actions Performance Metrics.

  5. Optionally, to select a time period to view usage metrics for, choose an option from the Period drop down menu at the top right of the page. For more information, see "Understanding GitHub Actions metrics aggregation."

  6. Click on the tab that contains the metrics you would like to view. For more information, see "About GitHub Actions usage metrics or "About GitHub Actions performance metrics."

  7. Optionally, to filter the data displayed in a tab, create a filter.

    1. Click on the Filter button.
    2. Click Add a filter.
    3. Choose a metric you would like to filter results by.
    4. Depending on the metric you chose, fill out information in the "Qualifier," "Operator," and "Value" columns.
    5. Optionally, click Add a filter to add another filter.
    6. Click Apply.
  8. Optionally, to download usage metrics to a CSV file, click .