Loading
Remove unused method Ci::JobArtifact.artifacts_size_for
Summary
Removes the unused class method Ci::JobArtifact.artifacts_size_for from app/models/ci/job_artifact.rb.
Related to #542966 (closed)
Verification
This method was verified as unused by:
-
keela --type methodsflagged it as unused - Grep search found no callers (production, specs, or config)
- No metaprogramming patterns reference it (no symbol refs,
send,public_send) - Not a Rails convention method
- Not a callback
Cascade Removals
None - this was a standalone removal.
Metrics
Source File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| File flog total | 372.1 | 369.7 | -2.4 (0.6%) |
| Method flog score | 2.4 | N/A | -2.4 removed |
Spec File Complexity (flog)
| Metric | Before | After | Improvement |
|---|---|---|---|
| Spec file flog total | N/A | N/A | 0 (no dedicated spec) |
| Spec block flog score | 0 | N/A | 0 removed |
Combined Flog Summary
| File | Flog Removed |
|---|---|
app/models/ci/job_artifact.rb |
2.4 |
| (no spec file) | 0 |
| Total | 2.4 |
Test Suite Impact
- Specs removed: 0 examples (no dedicated spec referenced this method)
- Spec file: none
- Time saved per run: 0.00 seconds
Estimated CI Savings
| Estimate | Pipelines/Month | Time Saved | Cost Saved/Month | Cost Saved/Year |
|---|---|---|---|---|
| Pessimistic | 15,000 | 0.00 hrs/month | $0.00 | $0.00 |
| Moderate | 30,000 | 0.00 hrs/month | $0.00 | $0.00 |
| Optimistic | 50,000 | 0.00 hrs/month | $0.00 | $0.00 |
Based on 0.00 seconds saved per pipeline × $0.03/minute (large runners: 3x cost factor on $10/1000 base minutes). This method had no spec examples, so there is no measurable spec-time saving; the benefit is code complexity and maintenance surface reduction.
Files Modified
app/models/ci/job_artifact.rb(method removed - 4 lines)scripts/lint/keela_baseline.yml(entry removed - 1 line)
Related
- Related to #542966 (closed) (Improve unused helper methods workflow)
- Part of dead code cleanup effort
- Method was listed in
scripts/lint/keela_baseline.yml