Enables nested timings for the given Tracker instance.
IMPORTANT: Enabling nested timings introduces edge cases and best practices you should understand before using. See the NestedTimingTracker documentation for more information.
The Tracker to wrap to enable nested timings.
A Tracker instance that can create nested timings.
Wraps a collector so the TrackingInfo instance's key and value strings will be replaced according to the specified map. Used primarily to convert system codes into human-readable values before passing to a collector.
The collector function to wrap. Will be invoked with a new TrackingInfo instance whose keys and values will be replaced according to the given map.
The
mapping of values to replace. For example, /\ben\b/gi -> 'English'
would change all instances of 'en'
to 'English'
. NOTE:
Be sure to use \b
to indicate word boundaries, ^
and $
to indicate
the start and end of a string, /g
to enable multiple replacements
within a string, and /i
to ignore case.
Whether to replace only object keys; if not specified, object keys and values will be replaced.
Provides utility methods for working with Tracker instances or collectors.