Read Anthropic’s case study about Graphite Reviewer

Monitoring code review performance with GitHub's insights

Sara Verdi
Sara Verdi
Graphite software engineer

Monitoring code review performance is important for improving code quality and ensuring efficient collaboration within your development team. While GitHub offers some built-in features to help you track repository activity, it does not provide detailed analytics specifically focused on code reviews out of the box. In this guide, we'll explore what GitHub is capable of in terms of monitoring code reviews and look at alternative approaches to gain deeper insights into your code review process.

GitHub provides basic insights into your repository's activity through the Insights tab, which includes information on commits, contributors, code frequency, and pull requests. While this can give you a general overview of your project's activity, it doesn't offer detailed metrics on code review performance, such as response times or review comments.

To gain detailed insights into your code review process on GitHub, consider the following approaches:

Several third-party tools integrate with GitHub to provide advanced analytics on code reviews. Tools like Pluralsight Flow (formerly GitPrime), LinearB, and Graphite offer metrics such as:

  • Review request response time: Average time reviewers take to respond to pull requests.
  • Review completion time: Time from pull request creation to approval or merge.
  • Comments per pull request: Engagement levels during code reviews.
  • Pull request rejection rates: Percentage of pull requests closed without merging.

These tools often provide dashboards and reports to help you visualize and track these metrics over time.

If you prefer a custom solution, you can use the GitHub API to extract data about pull requests and code reviews. By fetching and analyzing this data, you can compute metrics such as:

  • Time intervals between pull request events.
  • Number of comments and reviews per pull request.
  • Status of pull requests (merged, closed, open).

This approach requires programming knowledge and possibly data analysis skills to process and visualize the data effectively.

You can automate data collection and reporting using GitHub Actions or custom scripts. For example, set up a scheduled GitHub Action that runs a script to gather code review metrics and generates a report or updates a dashboard.

  • Set clear expectations: Define acceptable response times and review practices for your team.
  • Regular reporting: Share metrics with your team regularly to promote transparency and continuous improvement.
  • Automate where possible: Use tools or scripts to automate data collection to reduce manual effort.

While GitHub Insights provides useful data, integrating Graphite Insights takes your code review performance monitoring to the next level. Graphite offers advanced analytics and reporting capabilities that go beyond GitHub's built-in tools, helping you gain deeper insights into your team’s engineering efficiency.

By integrating Graphite Insights with your GitHub repository, you can unlock powerful features such as:

  • Combine data sources: Aggregate data from GitHub and other tools in a unified view that provides a comprehensive understanding of your development process, from code review performance to team velocity and deployment success.

  • Custom dashboards: Create and save personalized dashboards to visualize key metrics that matter most to your team. Track stats such as total PRs merged, average number of PRs reviewed per person, and median review response times, allowing you to pinpoint bottlenecks and streamline your review process.

  • Detailed performance stats: With Graphite Insights, you can monitor in-depth stats such as the number of review cycles until merge, median wait time for the first review, and PR activity trends across selected users. This transparency empowers teams of all roles to benefit from real-time, actionable data.

  • Historical data and flexible timeframes: Analyze up to two years of historical data and view metrics across various time periods—weekly, monthly, quarterly, or custom ranges. This allows you to track long-term trends and adjust your development strategies accordingly.

  • Customizable views and sharing: Graphite allows you to name, save, and share custom insights views with teammates. Filter data by repository, user, or time period, and easily share a permalink to specific views to foster collaboration and informed decision-making.

To explore the full capabilities of Graphite Insights and boost your team's engineering efficiency, visit Graphite.

While GitHub's built-in features provide some insights into repository activity, they may not offer the detailed code review analytics that teams need to monitor performance effectively. By leveraging third-party tools like Graphite, the GitHub API, or custom scripts, you can obtain valuable metrics to enhance your code review process and improve overall code quality.

Graphite
Git stacked on GitHub

Stacked pull requests are easier to read, easier to write, and easier to manage.
Teams that stack ship better software, faster.

Or install our CLI.
Product Screenshot 1
Product Screenshot 2