Architect's Guide
Jul 4, 2023 · Backend Development
Using Java Agent and Instrumentation for Non‑Intrusive Method Timing and Tracing
This article explains how to replace invasive manual timing code with a lightweight Java Agent that leverages the java.lang.instrument API, ASM bytecode manipulation, and the Attach API to measure method execution time, perform dynamic class redefinition, and integrate with tools like Arthas for runtime tracing.
ASMArthasAttach API
0 likes · 22 min read