profileNow

Force-starts profiling of the current request immediately (FusionReactor's "Profile now"), instead of waiting for the request to cross the slow-request threshold. Takes one sample synchronously. Returns true when the sampling profiler is enabled, false when it is off server-wide.

profileNow() → returns boolean

This function requires RustCFML.  Not supported on Lucee, Adobe ColdFusion, etc.

Examples
Sample code invoking the profileNow function

Arm sampling for the current request and later inspect the result.

on = profileNow();
// ... do work ...
if ( on ) {
    writeDump( getRequestProfile() );
}

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub