Peak Hours & Commit Types
Peak Hours
Peak hours analysis shows when a contributor is most active, based on the hour each commit was authored.
How It Works
- Extract the hour (0–23) from each commit's
committed_attimestamp - Build a histogram counting commits per hour across the date range
- Identify peak hours (highest-frequency bins)
What Peak Hours Reveal
| Pattern | Possible Interpretation |
|---|---|
| Morning cluster (8–12) | Focused morning coder, meetings in afternoon |
| Afternoon cluster (13–17) | Morning meetings, codes after lunch |
| Evening cluster (18–22) | After-hours worker or different timezone |
| Late night (22–4) | Night owl, timezone mismatch, or crunch |
| Bimodal (morning + evening) | Meetings midday, codes around them |
WARNING
Peak hours use commit timestamps, which may not reflect actual coding time. A developer might code for hours and commit once. Use this as directional, not precise.
Commit Types
Commit type analysis breaks down a contributor's work by conventional commit categories.
Supported Types
| Type | Description |
|---|---|
feat | New feature or functionality |
fix | Bug fix |
refactor | Code restructuring without behavior change |
test | Adding or updating tests |
docs | Documentation changes |
chore | Maintenance, tooling, config |
style | Code style/formatting changes |
perf | Performance improvements |
Metrics
For each contributor:
- Count per type
- Percentage per type (out of total commits)
Healthy Distributions
There's no single "right" distribution, but some patterns are informative:
| Pattern | Signal |
|---|---|
High feat ratio | Active feature development phase |
High fix ratio (> 50%) | Bug-heavy period — triggers alert |
| Balanced feat/fix/refactor | Sustainable development cycle |
Zero test commits | May indicate low test discipline — triggers alert |
High chore ratio | Heavy tooling/maintenance phase |
Test Ratio
The test ratio measures what percentage of a contributor's commits touch test-related files.
Detection
Files are considered test-related if their path contains:
testspec__tests__
Thresholds
| Ratio | Interpretation |
|---|---|
| > 30% | Strong test discipline |
| 10–30% | Moderate test coverage habits |
| < 10% | Low test discipline — triggers alert (if ≥ 5 commits in period) |
