How to Shift Left with Code Profiling
May 12, 2021

Madeline Horton
Stackify

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

June 22, 2021

Your employees aren't coming back to the office, at least not in the traditional sense. The pandemic shifted almost all industries into remote work. And according to the results of Ivanti's Everywhere Workplace survey, they're not interested in going back to the way things once were ...

June 21, 2021

Respondents to an OpsRamp survey are moving forward with digital transformation, but many are re-evaluating the number and type of tools they're using. There are three main takeaways from the survey ...

June 17, 2021

More and more mainframe decision makers are becoming aware that the traditional way of handling mainframe operations will soon fall by the wayside. The ever-growing demand for newer, faster digital services has placed increased pressure on data centers to keep up as new applications come online, the volume of data handled continually increases, and workloads become increasingly unpredictable. In a recent Forrester Consulting AIOps survey, commissioned by BMC, the majority of respondents cited that they spend too much time reacting to incidents and not enough time finding ways to prevent them ...

June 16, 2021

In the age of digital transformation, enterprises are migrating to open source software (OSS) in droves to streamline operations and improve customer and employee experiences. However, to unlock the deluge of OSS benefits, it's not enough for organizations to simply implement the software. They must take the necessary steps to build an intentional OSS strategy rooted in ongoing third-party support and training ...

June 15, 2021

In Part 1 of this series, we explored the top pain points associated with managing Internet-based WANs today. This second installment will focus on today's most prevalent SD-WAN deployment challenges specifically and what you can do to better manage modern WANs overall ...

June 14, 2021

Enterprise wide-area networks (WANs) have undergone an incredible transformation over the past several years. More often than not, they're hybrid, offering multiple connection paths between WANs. This provides many benefits but also makes them more challenging to manage than ever before. In Part 1 of this series, we'll explore the top pain points associated with Internet-based WANs ...

June 10, 2021

As we have seen during this digital transformation boom during the pandemic, technologists are managing more applications and data than ever before, which has led three quarters of technologists to be concerned with increased IT complexity. Even more significant, 89% admitted to feeling under immense pressure to keep up with the churn, according to the recent AppDynamics Agents of Transformation report. It's clear that the pandemic has pushed many technologists to their breaking point. To help tackle IT burnout, tech professionals need a "canary" to help them streamline and catch the anomalies before they cause any major performance issues ...

June 09, 2021

An hour-long outage this Tuesday ground the Internet to a halt after popular Content Delivery Network (CDN) provider, Fastly, experienced a glitch that downed Reddit, Spotify, HBO Max, Shopify, Stripe and the BBC, to name just a few of properties affected ...

June 08, 2021

Digital experience has existed for a while now. We have now begun to scratch the surface to measure it. So that calls for Digital Experience Monitoring (DEM). DEM extends Application Performance Monitoring (APM) and Network Performance Management (NPM) to view and optimize application performance issues from the end-user perspective ...

June 07, 2021

The rising adoption of cloud-native architectures, DevOps, and agile methodologies has broken traditional approaches to application security, according to Precise, automatic risk and impact assessment is key for DevSecOps, a new report from Dynatrace, based on an independent global survey of 700 CISOs ...