diff --git a/benchmarks/Lexer.php b/benchmarks/Lexer.php index 6d9cc5b2..8edd0921 100644 --- a/benchmarks/Lexer.php +++ b/benchmarks/Lexer.php @@ -1,13 +1,11 @@ =')) { require_once 'HTMLPurifier/Lexer/DOMLex.php'; $LEXERS['DOMLex'] = new HTMLPurifier_Lexer_DOMLex(); } -// PEAR -require_once 'Benchmark/Timer.php'; // to do the timing -require_once 'Text/Password.php'; // for generating random input - // custom class to aid unit testing class RowTimer extends Benchmark_Timer { diff --git a/benchmarks/ProfileDirectLex.php b/benchmarks/ProfileDirectLex.php deleted file mode 100644 index 24875ca0..00000000 --- a/benchmarks/ProfileDirectLex.php +++ /dev/null @@ -1,17 +0,0 @@ -tokenizeHTML($input, $config, $context); -} diff --git a/benchmarks/Trace.php b/benchmarks/Trace.php index fa98ffac..4cfb1b34 100644 --- a/benchmarks/Trace.php +++ b/benchmarks/Trace.php @@ -3,6 +3,11 @@ ini_set('xdebug.trace_format', 1); ini_set('xdebug.show_mem_delta', true); +if (file_exists('Trace.xt')) { + echo "Previous trace Trace.xt must be removed before this script can be run."; + exit; +} + xdebug_start_trace(dirname(__FILE__) . '/Trace'); require_once '../library/HTMLPurifier.auto.php'; @@ -10,3 +15,5 @@ $purifier = new HTMLPurifier(); $data = $purifier->purify(file_get_contents('samples/Lexer/4.html')); xdebug_stop_trace(); + +echo "Trace finished.";