static public function end( $name )
    {
        if ( !ObjectManager::getInstance()->get( Config::class )->getValue( 'profile' ) ) {
            return;
        }

        if ( $name != self::getName( self::$currentProfileNames[count( self::$currentProfileNames ) - 1] ) ) {
            throw new \Exception( sprintf( 'Not an expected end name `%s`.', $name ) );
        }

        $path = implode( self::PATH_SEPARATOR, self::$currentProfileNames );
        self::$profiles[$path]['end_at'] = microtime( true );
        self::$profiles[$path]['end_used_memory'] = memory_get_usage();

        array_pop( self::$currentProfileNames );
    }