Athena carries a few functions for inspecting its own behavior. They exist to
diagnose the executor, not to script with.
These are only present in logging builds. In a release build the globals
below are not registered at all, so getenvprofile and the rest will be nil.
Guard any use of them.
Environment profile
getenvprofile returns an array of { name, calls } rows, one per environment
function that has been called at least once, giving a true call count per
function. resetenvprofile zeroes the counters.
This is the reliable way to count calls. Reading the log instead undercounts,
because some entries latch after the first hit and others are sampled.
Log channels
getlogchannels returns a map of channel name to whether it is on.
setlogchannel turns one on or off, which is how you quieten or expand the
console without rebuilding.
Errors