<commit_before><?php
/**
 * @var \Spiral\Profiler\Profiler $profiler
 * @var float                     $started
 */
$colors = array(
    2    => 'default',
    30   => 'orange',
    1000 => 'red'
);
?>
<div class="plugin" id="profiler-plugin-benchmarks">
    <div class="title top-title">[[Application Profiling]]</div>
    <div class="flow" id="profiler-time-flow">
        <table>
            <thead>
            <tr>
                <th style="width: 10%">[[Record]]</th>
                <th>[[Timeline]]</th>
            </tr>
            </thead>
        </table>
        <?php
        $benchmarks = $profiler->getBenchmarks($ending);

        $profilerOffset = (microtime(true) - SPIRAL_INITIAL_TIME);
        $profilerFrame = $ending - $started;
        $profilerScale = $profilerOffset / $profilerFrame;

        foreach ($benchmarks as $record => $benchmark)
        {
            $lineLength = 100 * (($benchmark['elapsed']) / $profilerFrame) / $profilerScale;
            foreach ($colors as $length => $color)
            {
                if ($lineLength < $length)
                {
                    break;
                }
            }

            $lineOffset = 100 * ($benchmark['started'] - $started) / $profilerFrame / $profilerScale;
            if ($lineOffset + $lineLength > 100)
            {<commit_msg>profiler improvements<commit_after><?php
/**
 * @var \Spiral\Profiler\Profiler $profiler
 * @var float                     $started
 */
$colors = array(
    2    => 'default',
    30   => 'orange',
    1000 => 'red'
);
?>
<div class="plugin" id="profiler-plugin-benchmarks">
    <div class="title top-title">[[Application Profiling]]</div>
    <div class="flow" id="profiler-time-flow">
        <table>
            <thead>
            <tr>
                <th style="width: 10%">[[Record]]</th>
                <th>[[Timeline]]</th>
            </tr>
            </thead>
        </table>
        <?php
        $benchmarks = $profiler->getBenchmarks($ending);

        $profilerOffset = (microtime(true) - SPIRAL_INITIAL_TIME);
        $profilerFrame = max($ending - $started, 0.001);
        $profilerScale = $profilerOffset / $profilerFrame;

        foreach ($benchmarks as $record => $benchmark)
        {
            $lineLength = 100 * (($benchmark['elapsed']) / $profilerFrame) / $profilerScale;
            foreach ($colors as $length => $color)
            {
                if ($lineLength < $length)
                {
                    break;
                }
            }

            $lineOffset = 100 * ($benchmark['started'] - $started) / $profilerFrame / $profilerScale;
            if ($lineOffset + $lineLength > 100)
            {
{'fraction_non_alphanumeric': 0.1563663440059568, 'fraction_numerical': 0.014892032762472078, 'mean_word_length': 1.7196356275303644, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2334963', 'n_tokens_mistral': 847, 'n_tokens_neox': 810, 'n_words': 154}