|
9 | 9 | # Company : Code24 BV, The Netherlands #
|
10 | 10 | # Author : Sergey Dryabzhinsky #
|
11 | 11 | # Company : Rusoft Ltd, Russia #
|
12 | | -# Date : Jun 05, 2023 # |
13 | | -# Version : 1.0.56 # |
| 12 | +# Date : Sep 22, 2023 # |
| 13 | +# Version : 1.0.57 # |
14 | 14 | # License : Creative Commons CC-BY license #
|
15 | 15 | # Website : https://github.com/rusoft/php-simple-benchmark-script #
|
16 | 16 | # Website : https://git.rusoft.ru/open-source/php-simple-benchmark-script #
|
17 | 17 | # #
|
18 | 18 | ################################################################################
|
19 | 19 | */
|
20 | 20 |
|
21 | | -$scriptVersion = '1.0.56'; |
| 21 | +$scriptVersion = '1.0.57'; |
22 | 22 |
|
23 | 23 | // Special string to flush buffers, nginx for example
|
24 | 24 | $flushStr = '<!-- '.str_repeat("", 8192).' -->';
|
|
88 | 88 | if (extension_loaded('brotli')) {
|
89 | 89 | @include_once("compression.inc");
|
90 | 90 | }
|
| 91 | +if (extension_loaded('gd')) { |
| 92 | + @include_once("php-gd-imagick-common.inc"); |
| 93 | + @include_once("php-gd.inc"); |
| 94 | +} |
| 95 | +if (extension_loaded('imagick')) { |
| 96 | + @include_once("php-gd-imagick-common.inc"); |
| 97 | + @include_once("php-imagick.inc"); |
| 98 | +} |
91 | 99 |
|
92 | 100 | $originMemoryLimit = @ini_get('memory_limit');
|
93 | 101 | $originTimeLimit = @ini_get('max_execution_time');
|
@@ -705,8 +713,8 @@ function gethostname() {
|
705 | 713 | '31_intl_message_format' => 200000,
|
706 | 714 | '32_intl_calendar' => 300000,
|
707 | 715 | '33_phpinfo_generate' => 10000,
|
708 | | - '34_gd_qrcode' => 700, |
709 | | - '35_imagick_qrcode' => 200, |
| 716 | + '34_gd_qrcode' => 1000, |
| 717 | + '35_imagick_qrcode' => 1000, |
710 | 718 | '36_zlib_compress' => 5000000,
|
711 | 719 | '36_gzip_compress' => 5000000,
|
712 | 720 | '36_bzip2_compress' => 500000,
|
@@ -1550,10 +1558,18 @@ function format_result_test($diffSeconds, $opCount, $memory = 0)
|
1550 | 1558 | $has_gd = "{$colorYellow}no{$colorReset}";
|
1551 | 1559 | if (extension_loaded('gd')) {
|
1552 | 1560 | $has_gd = "{$colorGreen}yes{$colorReset}";
|
| 1561 | + $info = gd_info(); |
| 1562 | + define("GD_VERSION",$info["GD Version"]); |
| 1563 | +} else { |
| 1564 | + define("GD_VERSION","-.-.-"); |
1553 | 1565 | }
|
1554 | 1566 | $has_imagick = "{$colorYellow}no{$colorReset}";
|
1555 | 1567 | if (extension_loaded('imagick')) {
|
1556 | 1568 | $has_imagick = "{$colorGreen}yes{$colorReset}";
|
| 1569 | + $imv = Imagick::getVersion(); |
| 1570 | + define("IMG_VERSION", $imv["versionString"]); |
| 1571 | +} else { |
| 1572 | + define("IMG_VERSION", "-.-.-"); |
1557 | 1573 | }
|
1558 | 1574 | $has_xdebug = "{$colorGreen}no{$colorReset}";
|
1559 | 1575 | if (extension_loaded('xdebug')) {
|
@@ -1581,8 +1597,12 @@ function format_result_test($diffSeconds, $opCount, $memory = 0)
|
1581 | 1597 | $has_intl = "{$colorGreen}yes{$colorReset}";
|
1582 | 1598 | }
|
1583 | 1599 | $has_zlib = "{$colorYellow}no{$colorReset}";
|
| 1600 | +$has_gzip = "{$colorYellow}no{$colorReset}"; |
1584 | 1601 | if (extension_loaded('zlib')) {
|
1585 | 1602 | $has_zlib = "{$colorGreen}yes{$colorReset}";
|
| 1603 | + if(function_exists('gzencode')) { |
| 1604 | + $has_gzip = "{$colorGreen}yes{$colorReset}"; |
| 1605 | + } |
1586 | 1606 | }
|
1587 | 1607 | $has_bz2 = "{$colorYellow}no{$colorReset}";
|
1588 | 1608 | if (extension_loaded('bz2')) {
|
@@ -1621,7 +1641,7 @@ function print_results_common()
|
1621 | 1641 | global $line, $padHeader, $cpuInfo, $padInfo, $scriptVersion, $maxTime, $originTimeLimit, $originMemoryLimit, $cryptAlgoName, $memoryLimitMb;
|
1622 | 1642 | global $flushStr, $has_apc, $has_pcre, $has_intl, $has_json, $has_simplexml, $has_dom, $has_mbstring, $has_opcache, $has_xcache;
|
1623 | 1643 | global $has_gd, $has_imagick, $has_igb, $has_msg, $has_jsond, $has_jsond_as_json;
|
1624 | | - global $has_zlib, $has_bz2, $has_lz4, $has_zstd, $has_brotli; |
| 1644 | + global $has_zlib, $has_gzip, $has_bz2, $has_lz4, $has_zstd, $has_brotli; |
1625 | 1645 | global $opcache, $has_eacc, $has_xdebug, $xcache, $apcache, $eaccel, $xdebug, $xdbg_mode, $obd_set, $mbover;
|
1626 | 1646 | global $showOnlySystemInfo, $padLabel, $functions, $runOnlySelectedTests, $selectedTests, $totalOps;
|
1627 | 1647 | global $colorGreen, $colorReset, $colorRed;
|
@@ -1656,15 +1676,16 @@ function print_results_common()
|
1656 | 1676 | . str_pad("dom", $padInfo, '', STR_PAD_LEFT) . " : $has_dom\n"
|
1657 | 1677 | . str_pad("intl", $padInfo, '', STR_PAD_LEFT) . " : $has_intl" . ($has_intl == "{$colorGreen}yes{$colorReset}" ? '; icu version: ' . INTL_ICU_VERSION : '')."\n"
|
1658 | 1678 | . str_pad("-optional->", $padInfo, '', STR_PAD_LEFT) . "\n"
|
1659 | | - . str_pad("gd", $padInfo, '', STR_PAD_LEFT) . " : $has_gd\n" |
1660 | | - . str_pad("imagick", $padInfo, '', STR_PAD_LEFT) . " : $has_imagick\n" |
| 1679 | + . str_pad("gd", $padInfo, '', STR_PAD_LEFT) . " : $has_gd: version: ". GD_VERSION."\n" |
| 1680 | + . str_pad("imagick", $padInfo, '', STR_PAD_LEFT) . " : $has_imagick: version: ".IMG_VERSION."\n" |
1661 | 1681 | . str_pad("-alternative->", $padInfo, '', STR_PAD_LEFT) . "\n"
|
1662 | 1682 | . str_pad("igbinary", $padInfo, '', STR_PAD_LEFT) . " : $has_igb\n"
|
1663 | 1683 | . str_pad("msgpack", $padInfo, '', STR_PAD_LEFT) . " : $has_msg\n"
|
1664 | 1684 | . str_pad("jsond", $padInfo, '', STR_PAD_LEFT) . " : $has_jsond\n"
|
1665 | 1685 | . str_pad("jsond as json >>", $padInfo, '', STR_PAD_LEFT) . " : $has_jsond_as_json\n"
|
1666 | 1686 | . str_pad("-compression->", $padInfo, '', STR_PAD_LEFT) . "\n"
|
1667 | 1687 | . str_pad("zlib", $padInfo, '', STR_PAD_LEFT) . " : $has_zlib\n"
|
| 1688 | + . str_pad("gzip", $padInfo, '', STR_PAD_LEFT) . " : $has_gzip\n" |
1668 | 1689 | . str_pad("bz2", $padInfo, '', STR_PAD_LEFT) . " : $has_bz2\n"
|
1669 | 1690 | . str_pad("lz4", $padInfo, '', STR_PAD_LEFT) . " : $has_lz4\n"
|
1670 | 1691 | . str_pad("zstd", $padInfo, '', STR_PAD_LEFT) . " : $has_zstd\n"
|
|
0 commit comments