for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace Overblog\GraphQLBundle\Benchmarks\Request;
use Overblog\GraphQLBundle\Benchmarks\Benchmark;
use Overblog\GraphQLBundle\Request\Parser;
use Symfony\Component\HttpFoundation\Request;
/**
* @Warmup(2)
* @Revs(100)
*/
final class ParserBench extends Benchmark
{
/** @var Parser */
private $parser;
public function setUp()
$this->parser = new Parser();
}
* @ParamProviders({"requestProvider"})
*
* @param array $args
public function benchParse(array $args)
$this->parser->parse(new Request(...$args));
public function requestProvider()
yield [['query' => '{ foo }']];
yield [['query' => 'query bar { foo }', 'variables' => '{"baz": "bar"}', 'operationName' => 'bar']];
yield [[], ['variables' => '{"baz": "bar"}', 'operationName' => 'bar'], [], [], [], ['CONTENT_TYPE' => 'application/graphql'], '{ foo }'];