How to Shift Left with Code Profiling
May 12, 2021

Madeline Horton

Share this

What is "Shifting Left?"

Development teams who utilize shift left practices typically employ frequent testing to speed up project deliverability and allow for better adherence to project timelines.

In Agile, development and testing work in tandem, with testing being performed at each stage of the software delivery lifecycle, also known as the SDLC. This combination of development and testing is known as "shifting left." Shift left is a software development testing practice intended to resolve any errors or performance bottlenecks as early in the software development lifecycle (SDLC) as possible.

Before Agile, software testing was performed using the waterfall methodology. When using the waterfall methodology, all testing occurs prior to deployment — from the non-production environments to the production environments. Through waterfall pre-deployment testing, issues are found in the code far too late and the release is inevitably delayed until all bottlenecks are fixed. Then, the code re-enters a testing period, which continues until all bugs are resolved and the code is deployed into the production environment. Waterfall methodology often negatively impacts the project’s deliverability and timeline. Increased time to market directly correlates with business revenue.

How Can I "Shift Left?"

In order to properly shift left, continuous testing must begin as soon as a developer starts to write code. A code profiler is one way of receiving immediate feedback and implementing a continuous testing loop in the preliminary stages of development.

Code profiling is one tool developers use to shift left and utilize frequent testing throughout the SDLC. Why? Fixing code directly while writing it on the developer’s workstation is essentially shifting as far left as possible. By shifting this far left, issues are found even before committing the code to a QA or non-production environment.

Traditionally, developers have used code profilers to identify performance bottlenecks without having to constantly touch their code. Code profilers are useful in answering questions such as "How many times is each method being called in my code" or "How long are these methods taking?" Additionally, code profilers track useful information such as memory allocation, garbage collection, web requests, and key methods in your code.

There are two types of code profilers: server-side profilers and desktop profilers. Server-side profilers track key performance methods in both pre-production and production environments to measure transaction timing and increased visibility into errors and logs. Another term for server-side profiling is Application Performance Management, or APM.

A desktop code profiler tracks the performance of every line of code within an individual method as well as tracking memory allocations and garbage collection to aid with memory leaks. Unfortunately, desktop profiling often causes applications to run slower than usual. In return, most developers utilize desktop profilers as a situational tool and not for daily use. Usually, developers only use code profilers when investigating a CPU or memory problem.

In order to provide both the granularity of a desktop code profiler and the light-weight nature of a server-side profiler, there are hybrid profilers. In a sense, hybrid profilers serve as the best of both worlds — merging key data from the server-side profiler with code-level details from the desktop profiler. Their light-weight nature is perfect for everyday use with server level insights and the ability to track key methods, transactions, dependency calls, errors, and logs.

What Code Profiler Should I Pick?

After evaluating the importance of a code profiler when implementing shift left methodology, it is important to keep in mind a few things. Often, profilers need to be built into the code itself. This is the reason why most desktop code profilers cause applications to run slow and are only utilized in specific circumstances. When looking at application performance management tools, note that most APMs require code or multiple configuration changes.

Whether you implement shift left methodology via a server-side, desktop, or hybrid code profiler, profilers are imperative for finding the hot path in your code. For example, a code profiler can be used to find what is using the 20% of the total CPU usage within your code. Then, your code profiler can help determine what you can do to improve your code.

Additionally, you can utilize a code profiler for proactively finding memory leaks as well as dependency call and transaction performance.

Code profilers are a necessary tool for constantly testing and improving your code throughout the SDLC as profilers can help look for the methods that can lead to the greatest improvement over time.

Madeline Horton is a Campaign Marketing Strategist at Stackify
Share this

The Latest

December 08, 2022

Industry experts offer thoughtful, insightful, and often controversial predictions on how APM, AIOps, Observability, OpenTelemetry and related technologies will evolve and impact business in 2023. Part 4 covers monitoring, site reliability engineering and ITSM ...

December 07, 2022

Industry experts offer thoughtful, insightful, and often controversial predictions on how APM, AIOps, Observability, OpenTelemetry and related technologies will evolve and impact business in 2023. Part 3 covers OpenTelemetry ...

December 06, 2022

Industry experts offer thoughtful, insightful, and often controversial predictions on how APM, AIOps, Observability, OpenTelemetry and related technologies will evolve and impact business in 2023. Part 2 covers more on observability ...

December 05, 2022

The Holiday Season means it is time for APMdigest's annual list of Application Performance Management (APM) predictions, covering IT performance topics. Industry experts — from analysts and consultants to the top vendors — offer thoughtful, insightful, and often controversial predictions on how APM, observability, AIOps and related technologies will evolve and impact business in 2023. Part 1 covers APM and Observability ...

December 01, 2022

You could argue that, until the pandemic, and the resulting shift to hybrid working, delivering flawless customer experiences and improving employee productivity were mutually exclusive activities. Evidence from Catchpoint's recently published Site Reliability Engineering (SRE) industry report suggests this is changing ...

November 30, 2022

There are many issues that can contribute to developer dissatisfaction on the job — inadequate pay and work-life imbalance, for example. But increasingly there's also a troubling and growing sense of lacking ownership and feeling out of control ... One key way to increase job satisfaction is to ameliorate this sense of ownership and control whenever possible, and approaches to observability offer several ways to do this ...

November 29, 2022

The need for real-time, reliable data is increasing, and that data is a necessity to remain competitive in today's business landscape. At the same time, observability has become even more critical with the complexity of a hybrid multi-cloud environment. To add to the challenges and complexity, the term "observability" has not been clearly defined ...

November 28, 2022

Many have assumed that the mainframe is a dying entity, but instead, a mainframe renaissance is underway. Despite this notion, we are ushering in a future of more strategic investments, increased capacity, and leading innovations ...

November 22, 2022

Most (85%) consumers shop online or via a mobile app, with 59% using these digital channels as their primary holiday shopping channel, according to the Black Friday Consumer Report from Perforce Software. As brands head into a highly profitable time of year, starting with Black Friday and Cyber Monday, it's imperative development teams prepare for peak traffic, optimal channel performance, and seamless user experiences to retain and attract shoppers ...

November 21, 2022

From staffing issues to ineffective cloud strategies, NetOps teams are looking at how to streamline processes, consolidate tools, and improve network monitoring. What are some best practices that can help achieve this? Let's dive into five ...