-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from absolvent/issue/ATP-439
ATP-439 Optimize swagger.yml loading
- Loading branch information
Showing
5 changed files
with
713 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Absolvent\swagger\Benchmarks; | ||
|
||
use Athletic\AthleticEvent; | ||
use Symfony\Component\Yaml\Yaml; | ||
|
||
final class YamlParsingBenchmark extends AthleticEvent | ||
{ | ||
/** @var string */ | ||
private $swaggerFile; | ||
|
||
public function __construct() | ||
{ | ||
$this->swaggerFile = 'fixtures/petstore-expanded.yml'; | ||
} | ||
|
||
/** | ||
* @iterations 1000 | ||
*/ | ||
public function yamlExtensionParsing() | ||
{ | ||
yaml_parse_file($this->swaggerFile); | ||
} | ||
|
||
|
||
/** | ||
* @iterations 1000 | ||
*/ | ||
public function symfonyYmlParsing() | ||
{ | ||
Yaml::parse(file_get_contents($this->swaggerFile)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.