/**
* Returns the global Profiler object, only creating it
* if it doesn't already exist.
*
* @param string $prefix Prefix used to distinguish profiler objects.
*
* @return Profiler The Profiler object.
*
* @since 1.7.0
*/
public static function getInstance($prefix = '')
{
if (empty(self::$instances[$prefix])) {
self::$instances[$prefix] = new static($prefix);
}
return self::$instances[$prefix];
}