Profiling Tools

Profiling tools help identify CPU, memory, thread, I/O, and code-level bottlenecks inside the application during performance testing.

What is Profiling?

Profiling is the process of analyzing an application to understand how it uses system resources and to identify performance bottlenecks at code or component level.

What Can We Profile?

  • CPU Utilization
  • Memory Usage & Leaks
  • Thread & Connection Activity
  • I/O & Disk Operations
  • Garbage Collection
  • Database Calls
  • Method Execution Time

Why Use Profiling Tools?

  • Find the root cause of slow transactions
  • Identify inefficient code & resource usage
  • Optimize application performance
  • Support capacity planning
  • Validate fixes after tuning

Popular Profiling Tools Overview

Tool Type Key Strength Best For Language / Platform License
JProfiler
Java Profiler Deep Java profiling (CPU, Memory, Threads, SQL, Locks) Java / J2EE Applications Java
Commercial (Paid)
VisualVM
Java Profiler Built-in JVM monitoring & profiling Java Applications Java
Open Source (Free)
Y
YourKit
Java Profiler Low overhead, advanced memory leak detection Enterprise Java Apps Java
Commercial (Paid)
d
dotTrace
.NET Profiler CPU & Memory profiling for .NET applications .NET / C# Apps .NET
Commercial (Paid)
Glowroot
APM / Profiler Full stack profiling (Java, DB, HTTP) Low overhead Web & Microservices Java
Open Source (Free)
Dynatrace
APM / Profiler Real-time application performance management Enterprise / Cloud Multi Platform
Commercial (Paid)
New Relic
APM / Profiler End-to-end visibility & code profiling Cloud / Web Apps Multi Platform
Commercial (Paid)
Py-Spy
Python Profiler Sampling profiler for Python (low overhead) Python Applications Python
Open Source (Free)

How Profiling Tools Help – Example Use Cases

CPU Bottleneck

Identify methods consuming most CPU

Memory Leak

Detect objects not released over time

Thread Contention

Find threads waiting for locks / resources
Top Waiting Threads
  • http-worker-156 2,450 ms
  • http-worker-157 2,320 ms
  • db-connection-12 1,980 ms

Slow SQL / DB Calls

Identify slow queries and DB calls
Top Slow Queries
  • SELECT * FROM Orders 2,560 ms
  • UPDATE Cart 1,980 ms
  • INSERT Payment 1,420 ms

I/O Wait

Detect disk / network I/O delays

Sample Profiling Reports (Tool-wise)

JProfiler
VisualVM
YourKit
dotTrace
Dynatrace
New Relic
Glowroot

Hot Spots - CPU Analysis

Memory & GC Analysis

Thread Timeline

Method Execution Time

Full Stack Tracing

Application Overview

Best Practices

  • Profile in a load environment similar to production.
  • Capture baseline before optimization.
  • Correlate profiling data with monitoring metrics.
  • Focus on top resource consumers (80/20 rule).
  • Re-profile after applying fixes.

When to Use Profiling?

  • High response time with low throughput.
  • High CPU usage or memory growth.
  • Frequent timeouts or slow transactions.
  • Database or external service delays.
Profiling drives code-level optimization, leading to faster applications and better user experience.