Expand description
§Software Engineering
Rust implementations of 29 software-engineering delivery, quality, and
reliability metrics — one module per topic. Each module implements the
formulas from its source chapter in the book Software Engineering
Metrics (software-engineering-metrics/locales/en-001/chapters/*.md),
documents them with runnable examples, and reproduces the chapter’s
worked example (where the chapter gives one) in its unit tests.
Dependencies are minimal: rusty_money is available for
currency-checked Money arithmetic (see each financial module’s own
“Money” section for a direct-usage example); every module’s own
functions still take and return plain f64, with no rusty_money
wrapper of any kind — combine the two directly in your own code rather
than through an adapter this crate provides. All quantities are f64
(or a small enum where the source material calls for a category, such
as a SPACE dimension or a vulnerability severity), and functions return
Option<f64> wherever a denominator could be zero.
§Quickstart
A speed improvement, paired with its guardrail, funding a return:
use software_engineering::flow_framework::{littles_law_wip, flow_efficiency_percent};
use software_engineering::dora_metrics::change_failure_rate_percent;
use software_engineering::return_on_investment::roi;
// A team arrives at 4 items/week with a 5-week flow time: Little's law
// says ~20 items are in process in the value stream at any moment.
let wip = littles_law_wip(4.0, 5.0);
assert_eq!(wip, 20.0);
// Of those 5 weeks, only 1.5 weeks is active work: 30% flow efficiency.
let efficiency = flow_efficiency_percent(1.5, 5.0).unwrap();
assert!((efficiency - 30.0).abs() < 1e-9);
// A speed improvement must be paired with its stability guardrail:
// change failure rate falls from 25% to 8% as the team ships faster,
// not despite it — the DORA finding that speed and stability move
// together in elite performers.
let cfr_after = change_failure_rate_percent(8.0, 100.0).unwrap();
assert!(cfr_after < 25.0);
// The combined delivery investment returns 2.0 (200%) on its cost —
// every $1 invested returns $2 in net profit, a 3x total return.
let r = roi(300_000.0, 100_000.0).unwrap();
assert_eq!(r, 2.0);§Module index by theme
Flow metrics —
flow_framework, cycle_time, queueing_theory,
lean_value_stream_metrics, pull_request_metrics, dora_metrics
Developer experience —
space_framework, developer_experience_metrics,
satisfaction_metrics, performance_metrics, activity_metrics,
communication_metrics
Code and quality —
code_complexity, test_effectiveness, code_churn,
technical_debt, static_analysis_metrics,
documentation_and_knowledge_metrics
Product and business —
escaped_defects, feature_adoption, unit_economics,
return_on_investment, customer_and_business_outcome_metrics
Reliability, operations, and security —
error_budget, incident_metrics, on_call_metrics,
vulnerability_management
AI-assisted development —
ai_assisted_development
Metrics programs —
maturity_model
Modules§
- activity_
metrics - Activity Metrics and Their Limits
- ai_
assisted_ development - Measuring AI-Assisted Software Development
- code_
churn - Code Churn and Hotspot Analysis
- code_
complexity - Code Complexity Metrics
- communication_
metrics - Communication and Collaboration Metrics
- customer_
and_ business_ outcome_ metrics - Customer and Business Outcome Metrics
- cycle_
time - Cycle Time and Its Components
- developer_
experience_ metrics - Developer Experience Metrics
- documentation_
and_ knowledge_ metrics - Documentation and Knowledge Metrics
- dora_
metrics - The DORA Metrics Framework
- error_
budget - SLIs, SLOs, and Error Budgets
- escaped_
defects - Escaped Defect Rate and Quality Escapes
- feature_
adoption - Feature Adoption and Usage Metrics
- flow_
framework - Flow Framework
- incident_
metrics - Incident Metrics
- lean_
value_ stream_ metrics - Lean Value Stream Metrics
- maturity_
model - Maturity Model for Engineering Metrics Programs
- on_
call_ metrics - On-Call, Capacity, and Operational Load Metrics
- performance_
metrics - Performance Metrics and Outcome Proxies
- pull_
request_ metrics - Pull Request and Code Review Metrics
- queueing_
theory - Queueing Theory
- return_
on_ investment - Return on Investment for Engineering Initiatives
- satisfaction_
metrics - Satisfaction and Well-Being Metrics
- space_
framework - The SPACE Framework
- static_
analysis_ metrics - Static Analysis and Code Smell Metrics
- technical_
debt - Technical Debt Measurement
- test_
effectiveness - Test Coverage and Test Effectiveness
- unit_
economics - Cost and Unit Economics of Engineering
- vulnerability_
management - Security and Vulnerability Management Metrics