Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables Configuration

hotpath behavior can be customized via environment variables. These take precedence over programmatic configuration (hotpath::main macro parameters and builder API).

Output

VariableDescription
HOTPATH_OUTPUT_FORMATOutput format: table, json, json-pretty, or none. Using none silences output while keeping the metrics server and MCP server active. (default: table)
HOTPATH_OUTPUT_PATHFile path for profiling reports. Takes precedence over programmatic output_path config. (default: stdout)
HOTPATH_REPORTComma-separated sections to include in report: functions-timing, functions-alloc, channels, streams, futures, threads, tokio_runtime, or all. (default: functions-timing,functions-alloc,threads)

Functions

VariableDescription
HOTPATH_FOCUSFilter profiled functions by name. Plain text does substring matching; wrap in /pattern/ for regex (e.g. HOTPATH_FOCUS="/^(compute|process)/"). (default: '')
HOTPATH_EXCLUDE_WRAPPERSet to true or 1 to calculate ratios using the sum of measured functions instead of the wrapper total. (default: false)
HOTPATH_ALLOC_SELFSet to true or 1 to track exclusive (non-cumulative) memory allocations per function instead of the default cumulative mode. (default: false)
HOTPATH_CPU_BASELINE_OFFSet to true or 1 to disable CPU baseline collection. (default: false)

Metrics Server

VariableDescription
HOTPATH_METRICS_PORTPort for the HTTP metrics server (binds to localhost only). (default: 6770)
HOTPATH_METRICS_SERVER_OFFSet to true or 1 to disable the HTTP metrics server entirely. (default: false)

MCP Server

VariableDescription
HOTPATH_MCP_PORTPort for the MCP (Model Context Protocol) server. (default: 6771)
HOTPATH_MCP_AUTH_TOKENWhen set, clients must include this token in the Authorization header. (default: '')

TUI

VariableDescription
HOTPATH_TUI_REFRESH_INTERVAL_MSTUI dashboard refresh interval in milliseconds. (default: 500)
HOTPATH_TUI_TABInitial tab to display when launching the TUI (e.g. functions, channels, streams). Useful for self-benchmarks. (default: '')
HOTPATH_METRICS_HOSTHost URL that the TUI console connects to for metrics data. (default: http://localhost)
HOTPATH_METRICS_PORTPort that the TUI console connects to for metrics data. (default: 6770)

Other

VariableDescription
HOTPATH_THREADS_INTERVALThread monitoring sample interval in milliseconds. (default: 1000)
HOTPATH_TOKIO_RUNTIME_INTERVALTokio runtime metrics sampling interval in milliseconds. (default: 1000)
HOTPATH_LOGS_LIMITMaximum number of log entries to keep per channel, stream, or function. (default: 50)
HOTPATH_SHUTDOWN_MSIf set a profiled program will shutdown after the specified ms timeout and print the performance report. (default: ''). Use before_shutdown to specify before shutdown callback.