If you’re having trouble bringing new features to market, it might be time to start a development quality program. Innovation and growth are dependent on code quality. Two hallmarks of success for DevOps teams are how quickly new features go to market and how often new features fail. Our 2022 observability report shows a strong correlation between full-stack observability, fewer outages, a faster MTTD, and a faster MTTR.
Here are four steps to better code quality.
1. Track your quality metrics.
Four key performance indicators (KPIs) help measure the quality of submitted code. These KPIs help you identify the sources of code defects and areas that require the greatest developer effort.
- Build success: This measures the number of times new code is successfully compiled or integrated into the overall application. You’re aiming for as close to 100% as possible.
- Unit test success: This is the percentage of unit tests your new code passes. The goal is to make this as high as possible.
- Code coverage: This is the amount of your application's code base that's subject to at least one unit test. Aim for 100% code coverage.
- Defect volume: The number of defects introduced into an application by a specific module of code. This number should be as low as possible.
2. Measure code velocity.
How fast is new code written and committed in your organization? Tracking code commit volume shows whether your development velocity is affecting code quality. Correlate defect volume with code commit volume to identify the optimal balance between velocity and stability.
3. Build development-quality dashboards.
Identify the technology that supports your development processes, such as source code repositories and build/test automation platforms. Then use your development toolchain's APIs to extract quality and velocity data and send them to New Relic using the custom events API. Find sample DevQual dashboards in the New Relic OMA resource center on GitHub, such as this bottom-of-the-funnel analysis dashboard.
4. Baseline. Improve. Wash, rinse, repeat.
When you’ve got data flowing into your development quality dashboards, it’s time to establish a baseline. This could be from two to six weeks of data, depending on your current development pace. One way to do this is to align baseline collection and evaluation with your sprints.
After you have your baseline, identify which areas need the most improvement. For example, if your defect volume is high, identify the specific source of new defects by tracking attributes such as timestamp, application, and code module. Now your engineering team can focus its efforts on improving those code modules that generate the most defects.
- To find out more about improving conversion rates, read our release quality implementation guide and observability maturity guide.
- Read our blog posts about best practices for alert quality, operational efficiency, and digital customer experience.
- Sign up for a free New Relic account with 100 GB of monthly data.
이 블로그에 표현된 견해는 저자의 견해이며 반드시 New Relic의 견해를 반영하는 것은 아닙니다. 저자가 제공하는 모든 솔루션은 환경에 따라 다르며 New Relic에서 제공하는 상용 솔루션이나 지원의 일부가 아닙니다. 이 블로그 게시물과 관련된 질문 및 지원이 필요한 경우 Explorers Hub(discuss.newrelic.com)에서만 참여하십시오. 이 블로그에는 타사 사이트의 콘텐츠에 대한 링크가 포함될 수 있습니다. 이러한 링크를 제공함으로써 New Relic은 해당 사이트에서 사용할 수 있는 정보, 보기 또는 제품을 채택, 보증, 승인 또는 보증하지 않습니다.