public static function start($name, $type = '')
    {
        if (!self::isEnabled()) {
            return;
        }

        $currentPointer = 'timetracker_' . self::$uniqueCounter++;
        array_push(self::$currentPointerStack, $currentPointer);
        array_push(self::$stack, $name);

        self::$stackLevel++;
        self::$stackLevelMax[] = self::$stackLevel;

        self::$stackLog[$currentPointer] = array(
            'level' => self::$stackLevel,
            'stack' => self::$stack,
            'time_start' => microtime(true),
            'realmem_start' => memory_get_usage(true),
            // 'emalloc_start' => memory_get_usage(false),
            'type' => $type,
        );

        if ($name == '__EAV_LOAD_MODEL__' && !empty(self::getConfiguration()->captureModelInfo)) {
            $trace = debug_backtrace();
            $className = get_class($trace[1]['args'][0]);
            $entityId = isset($trace[1]['args'][1]) ? $trace[1]['args'][1] : 'not set';
            $attributes = isset($trace[1]['args'][2]) ? $trace[1]['args'][2] : null;
            self::$stackLog[$currentPointer]['detail'] = "$className, id: $entityId, attributes: " . var_export($attributes, true);
        }

        if (!empty(self::getConfiguration()->captureBacktraces)) {
            $trace = isset($trace) ? $trace : debug_backtrace();
            $fileAndLine = self::getFileAndLine($trace, $type, $name);
            self::$stackLog[$currentPointer]['file'] = $fileAndLine['file'];
            self::$stackLog[$currentPointer]['line'] = $fileAndLine['line'];
        }

    }