Analyzer func-latency-distr
Name
func-latency-distr - Function Latency Distribution
This analyzer profiles the latency distribution of specific functions across various runtime environments including C libraries, LuaJIT, and application executables. It captures timing data for function calls and generates histogram visualizations showing the distribution of execution times. The analyzer helps identify performance anomalies, outliers, and typical latency patterns for targeted functions, enabling precise optimization of critical code paths.
Resource Category
Latency.
Application Type & Technical Stack
- All
Command Line Syntax
The analyzer can be invoked directly on the command-line via the orxray
utility from the openresty-xray-cli software package.
Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).
# PID is the target process PID.
orxray analyzer run func-latency-distr -p PID
# trace a shell command directly
orxray analyzer run func-latency-distr -c SHELL_CMD
Tracing Multiple Processes
Not supported.
Output Formats
- Histogram Bar Charts
- Plain Texts
Output Example
{
"kind": "func-latency-distr",
"data": {
"dist": {
"1": 0, "2": 0, "4": 14, "8": 122, "16": 263, "32": 218,
"64": 275, "128": 93, "256": 11, "512": 2, "1024": 0, "2048": 0
}
}
}
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.