Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
6403
vendor/masterminds/html5/test/benchmark/example.html
vendored
Normal file
6403
vendor/masterminds/html5/test/benchmark/example.html
vendored
Normal file
File diff suppressed because it is too large
Load diff
29
vendor/masterminds/html5/test/benchmark/run.php
vendored
Normal file
29
vendor/masterminds/html5/test/benchmark/run.php
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
|
||||
$iterations = isset($argv[1]) ? $argv[1] : 100;
|
||||
|
||||
$html5 = new Masterminds\HTML5();
|
||||
$content = file_get_contents(__DIR__ . '/example.html');
|
||||
$dom = $html5->loadHTML($content);
|
||||
|
||||
$samples = array();
|
||||
for ($i = 0; $i < $iterations; $i++) {
|
||||
$t = microtime(true);
|
||||
$dom = $html5->loadHTML($content);
|
||||
$samples[] = microtime(true) - $t;
|
||||
}
|
||||
$time = array_sum($samples) / count($samples);
|
||||
echo "Loading: " . ($time * 1000) . "\n";
|
||||
|
||||
$samples = array();
|
||||
for ($i = 0; $i < $iterations; $i++) {
|
||||
$t = microtime(true);
|
||||
$html5->saveHTML($dom);
|
||||
$samples[] = microtime(true) - $t;
|
||||
}
|
||||
$time = array_sum($samples) / count($samples);
|
||||
echo "Writing: " . ($time * 1000) . "\n";
|
||||
|
||||
exit(0);
|
Reference in a new issue