Development Metrics

Development metrics focus on the time spent in different phases of the development process, helping teams understand and optimize their development workflow.

Available Metrics

coding-time
string
Time spent coding
pickup-time
string
Time between commit and PR open
commit-to-open
string
Time from commit to PR open
reviews-count
string
Number of reviews
open-to-review
string
Time between PR open and first review
review-to-merge
string
Time between first review and merge
review-time
string
Total time spent in review
rework-time
string
Time spent on rework after review
cycle-time
string
Full cycle time from commit to merge

Cycle Time Metric

This example demonstrates how to retrieve the cycle time metric, which measures the full development cycle from initial commit to merge.
curl -X POST 'https://api.bilanc.co/metrics/v2/cycle-time' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "repositories": ["repo-name-1", "repo-name-2"],
      "start_date": "2023-01-01",
      "end_date": "2023-02-28"
    },
    "group_by": ["repository_name", "name"],
    "date_level": "month",
    "aggregation": "avg",
    "date_field": "merged_at",
  }'

Review Time Metric

This example demonstrates how to retrieve the review time metric, which measures the total time spent in the review phase.
curl -X POST 'https://api.bilanc.co/metrics/v2/review-time' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "team_ids": ["team123"],
      "start_date": "2023-01-01",
      "end_date": "2023-02-28"
    },
    "group_by": ["team_name"],
    "date_level": "month",
    "aggregation": "avg"
  }'

Parameter Notes

date_field
string
For development metrics, the following date fields are available:
  • created_at: For metrics related to the pull request creation time
  • merged_at: For metrics related to the pull request merge time (best for cycle time)
  • first_review_at: For metrics related to pull request first review time
aggregation
string
Metrics that are not count based can be aggregated using the following method:
  • sum, max, min, avg

Common Use Cases

  • Track Cycle Time Trends: Monitor how development cycle time changes over time
  • Identify Bottlenecks: Find which part of the development process takes the longest
  • Compare Team Performance: Compare cycle times across different teams or repositories
  • Set Performance Goals: Establish baseline metrics and set improvement goals