<commit_before><?php

/**
 * League.Uri (https://uri.thephpleague.com)
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

namespace League\Uri;

use PhpBench\Attributes as Bench;

final class HttpBench
{
    #[Bench\OutputTimeUnit('seconds')]
    #[Bench\Assert('mode(variant.mem.peak) < 2097152'), Bench\Assert('mode(variant.time.avg) < 10000000')]
    public function benchBuildingAnUriFromUriComponents(): void
    {
        $components = [
            'scheme' => 'https',
            'host' => 'uri.thephpleague.com',
            'user' => 'php-fig',
            'pass' => '<PASSWORD>',
            'port' => 1337,
            'path' => '/5.0',
            'query' => 'q=val1&q=val2&query[3]=val3',
            'fragment' => 'foobar',
        ];

        for ($i = 0; $i < 100_000; $i++) {
            $uri = Http::createFromComponents($components);
        }
    }
}<commit_msg>typo fix<commit_after><?php

/**
 * League.Uri (https://uri.thephpleague.com)
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

namespace League\Uri;

use PhpBench\Attributes as Bench;

final class HttpBench
{
    #[Bench\OutputTimeUnit('seconds')]
    #[Bench\Assert('mode(variant.mem.peak) < 2097152'), Bench\Assert('mode(variant.time.avg) < 10000000')]
    public function benchBuildingAnUriFromUriComponents(): void
    {
        $components = [
            'scheme' => 'https',
            'host' => 'uri.thephpleague.com',
            'user' => 'php-fig',
            'pass' => '<PASSWORD>',
            'port' => 1337,
            'path' => '/5.0',
            'query' => 'q=val1&q=val2&query[3]=val3',
            'fragment' => 'foobar',
        ];

        for ($i = 0; $i < 100_000; $i++) {
            Http::createFromComponents($components);
        }
    }
}
{'fraction_non_alphanumeric': 0.17142857142857143, 'fraction_numerical': 0.03251231527093596, 'mean_word_length': 2.4658703071672354, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '185549', 'n_tokens_mistral': 708, 'n_tokens_neox': 660, 'n_words': 138}