Analyzer ngx-req-lj-yield-time

Name

ngx-req-lj-yield-time - Nginx Request LuaJIT Yield Latency

This analyzer measures the cumulative latency of LuaJIT yield operations during Nginx request processing in applications such as OpenResty and Kong. It tracks the total time spent in yield operations across different code paths, providing insights into how blocking operations affect overall request latency. Unlike the flame graph variant, this analyzer focuses on aggregate latency metrics, helping identify which parts of the application contribute most to yield-related delays in request handling.

Resource Category

Latency.

Application Type & Technical Stack

  • OpenResty
  • Kong
  • APISIX

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 ngx-req-lj-yield-time -p PID

# trace a shell command directly
orxray analyzer run ngx-req-lj-yield-time -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-req-lj-yield-time -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-req-lj-yield-time --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Plain Texts

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.