diff options
author | Andrew Dolgov <[email protected]> | 2022-12-13 20:08:43 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2022-12-13 20:08:43 +0300 |
commit | 8ea537123d1cef38f25f9fbe92e3a9c0f89de55a (patch) | |
tree | 0b40ea733af15c1f33403e42afc8afa14d48b87c /plugins/af_readability/vendor/masterminds/html5/test/benchmark/run.php | |
parent | 313f12ae9306fc62bbbfa10310a2feb20aa274c5 (diff) |
move af_readability out of master tree
Diffstat (limited to 'plugins/af_readability/vendor/masterminds/html5/test/benchmark/run.php')
-rw-r--r-- | plugins/af_readability/vendor/masterminds/html5/test/benchmark/run.php | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/plugins/af_readability/vendor/masterminds/html5/test/benchmark/run.php b/plugins/af_readability/vendor/masterminds/html5/test/benchmark/run.php deleted file mode 100644 index 2ca190783..000000000 --- a/plugins/af_readability/vendor/masterminds/html5/test/benchmark/run.php +++ /dev/null @@ -1,29 +0,0 @@ -<?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); |