# Understanding Request Latency with Profiling

DevFeed: [Understanding Request Latency with Profiling](<https://devfeed.tech/articles/understanding-request-latency-with-profiling-25645.md>)

Original publisher: [Read original article](<https://richardstartin.github.io/posts/wallclock-profiler>)

Author: Richard Startin's Blog

Published: 2023-09-05T00:00:00Z

Content type: article

Language: en

Sources: [Richard Startin's Blog](<https://devfeed.tech/sources/richard-startin-s-blog.md>)

Topics: [Latency](<https://devfeed.tech/topics/latency.md>), [Java](<https://devfeed.tech/topics/java.md>), [datadog](<https://devfeed.tech/topics/datadog.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [applications](<https://devfeed.tech/tags/applications.md>), [backend](<https://devfeed.tech/tags/backend.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [datadog](<https://devfeed.tech/tags/datadog.md>), [java](<https://devfeed.tech/tags/java.md>), [latency](<https://devfeed.tech/tags/latency.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [request](<https://devfeed.tech/tags/request.md>), [root-cause-analysis](<https://devfeed.tech/tags/root-cause-analysis.md>)

## AI overview

This article explains how Datadog's Java wallclock profiler can help investigate high request latency when time spent off CPU, rather than CPU time, is the likely cause. It discusses using profiling to support root-cause analysis without changing or even seeing the application code.

## Source excerpt

It can be hard to figure out why response times are high in Java applications. In my experience, people either apply a process of elimination to a set of recent commits, or might sometimes use profiles of the system to explain changes in metrics. Making guesses about recent commits can be frustrating for a number of reasons, but mostly because even if you pinpoint the causal change, you still might not know why it was a bad change and are left in limbo. In theory, using a profiler makes root cause analysis a part of the triage process, so adopting continuous profiling should make this whole process easier, but using profilers can be frustrating because you're using the wrong type of profile for analysis. Lots of profiling data focuses on CPU time, but the cause of your latency problem may be related to time spent off CPU instead. This post is about Datadog's Java wallclock profiler, which I worked on last year, and explores how to improve request latency without making any code changes, or even seeing the code for that matter.