From 47640a0ce872038110ff011c22bf9e0b557aa67e Mon Sep 17 00:00:00 2001 From: czaks Date: Tue, 2 Jul 2013 22:45:52 -0400 Subject: tools/: move cli utils from tinyboard-tools to tinyboard repo --- tools/benchmark.php | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tools/benchmark.php (limited to 'tools/benchmark.php') diff --git a/tools/benchmark.php b/tools/benchmark.php new file mode 100644 index 00000000..8c97364c --- /dev/null +++ b/tools/benchmark.php @@ -0,0 +1,52 @@ +#!/usr/bin/php +resize( + $config['thumb_ext'] ? $config['thumb_ext'] : $extension, + $config['thumb_width'], + $config['thumb_height'] + ); + + $thumb->to($out); + $thumb->_destroy(); + $image->destroy(); + } + $end = microtime(true); + + printf("Took %.2f seconds (%.2f/second; %.2f ms)\n", $end - $start, $rate = ($count / ($end - $start)), 1000 / $rate); + + unlink($out); +} + +benchmark('gd'); +benchmark('imagick'); +benchmark('convert'); + -- cgit v1.3