FQL\Query\Debugger class provides CLI output utilities for inspecting queries, measuring execution time, and benchmarking iteration performance.
Starting and stopping
CallDebugger::start() at the beginning of your script. It records the start timestamp and prints an initial memory snapshot. Call Debugger::end() when you are done to print final timing and memory totals.
Inspecting a query
Debugger::inspectQuery() executes a query and prints the SQL representation, result count, memory size, and optionally all rows.
Inspecting a raw SQL string
Debugger::inspectStreamSql() parses a raw FQL string against an existing stream and shows what the applied query looks like compared to the original input.
Debugger::inspectSql() when you want to parse a self-contained FQL string (with format and path embedded) and have the Query object returned:
Benchmarking a query
Debugger::benchmarkQuery() runs a query in both stream and in-memory modes for the specified number of iterations, then prints throughput stats.
2500.
Dumping a value
Debugger::dump() delegates to Tracy’s dump() function for pretty-printing any PHP value:
Example output
Runningcomposer example:csv produces output similar to this:
STREAM BENCHMARK (re-reads the file each time) and IN_MEMORY BENCHMARK (iterates a cached result set). Use in-memory results when you need to iterate over the same data multiple times.