src/services/Profile.php
public function begin(string $profile)
    {
        Craft::beginProfile(
            $profile,
            Craft::t('twig-profiler', self::CATEGORY_PREFIX)
            .TwigProfiler::$renderingTemplate
        );
    }
public function begin(string $profile)
    {
        Craft::beginProfile(
            $profile,
            Craft::t('twig-profiler', self::CATEGORY_PREFIX)
            .TwigProfiler::$renderingTemplate
        );
    }
Start logging profiling data

@param string $profile