Expand description
Lightweight instrumentation for profiling array parsing, expression parsing, and statement parsing.
This module provides zero-cost abstractions for profiling when the instrument feature
is enabled. When disabled, all instrumentation macros and calls compile to nothing.
Structs§
- Instrument
Stats - Global instrumentation statistics
Functions§
- get_
stats - Get current statistics (snapshot)
- record_
arena_ alloc - Record an arena.alloc call
- record_
arena_ vec_ allocation - Record an ArenaVec allocation with size info
- record_
arena_ vec_ empty - Record an empty ArenaVec that was allocated
- record_
arena_ vec_ waste - Record wasted capacity in ArenaVec (allocated but not used)
- record_
parse_ array - Record array parsing started
- record_
parse_ array_ element - Record array element parsing started
- record_
parse_ array_ element_ count - Record total array elements parsed
- record_
parse_ array_ element_ with_ arrow - Record array element with => operator
- record_
parse_ array_ simple_ value - Record a simple/atomic value in an array (not followed by binary operators)
- record_
parse_ atom - Record parse_atom call
- record_
parse_ attribute - Record attribute group parsing
- record_
parse_ class - Record a class/trait/interface declaration
- record_
parse_ expr - Record a parse_expr call
- record_
parse_ expr_ array_ first - Record first parse_expr call in array element (key or value)
- record_
parse_ expr_ array_ second - Record second parse_expr call in array element (after =>)
- record_
parse_ expr_ bp_ recursive - Record a recursive parse_expr_bp call (min_bp != 0)
- record_
parse_ foreach - Record a foreach statement
- record_
parse_ function - Record a function/method declaration
- record_
parse_ if - Record if/elseif/else statements
- record_
parse_ loop - Record for/while/do-while statements
- record_
parse_ stmt - Record a statement parse call
- record_
parse_ switch - Record switch statements
- record_
parse_ try - Record try/catch/finally statements
- report_
stats - Print a formatted report of statistics
- reset_
stats - Reset all statistics