Skip to content

Commit 00684a1

Browse files
Удалил тесты xmlrpc - issue rusoft#13
1 parent 32bb0d5 commit 00684a1

File tree

2 files changed

+8
-93
lines changed

2 files changed

+8
-93
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* ChangeLog вынесен в отдельный файл
66
* Убрали функцию pi из math теста - они не принимает аргумент в php-8
7-
* Тесты модуля xmlrpc заменены на тесты domб для совместимости с php-8 (@todo)
7+
* Тесты модуля xmlrpc были удалены из-за отсутствия в php-8
88
* Поддержка php-8 (@todo)
99

1010
@ 2020-02-22, v1.0.36

bench.php

Lines changed: 7 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
################################################################################
44
# PHP Benchmark Performance Script #
55
# 2010 Code24 BV #
6-
# 2015-2019 Rusoft #
6+
# 2015-2020 Rusoft #
77
# #
88
# Author : Alessandro Torrisi #
99
# Company : Code24 BV, The Netherlands #
1010
# Author : Sergey Dryabzhinsky #
1111
# Company : Rusoft Ltd, Russia #
12-
# Date : Feb 22, 2020 #
13-
# Version : 1.0.36 #
12+
# Date : Nov 26, 2020 #
13+
# Version : 1.0.37 #
1414
# License : Creative Commons CC-BY license #
1515
# Website : https://github.com/rusoft/php-simple-benchmark-script #
1616
# Website : https://git.rusoft.ru/open-source/php-simple-benchmark-script #
1717
# #
1818
################################################################################
1919
*/
2020

21-
$scriptVersion = '1.0.36';
21+
$scriptVersion = '1.0.37';
2222

2323
ini_set('display_errors', 0);
2424
ini_set('error_log', null);
@@ -315,6 +315,7 @@
315315
'7.2' => 105,
316316
'7.3' => 92,
317317
'7.4' => 86,
318+
'8.0' => 86,
318319
);
319320
$dumbTestMaxPhpTimes = array(
320321
'4.4' => 2.13,
@@ -328,6 +329,7 @@
328329
'7.2' => 1.18,
329330
'7.3' => 1.05,
330331
'7.4' => 1.02,
332+
'8.0' => 1.02,
331333
);
332334
$testsLoopLimits = array(
333335
'01_math' => 1000000,
@@ -358,8 +360,6 @@
358360
'21_loop_except' => 4000000,
359361
'22_loop_nullop' => 50000000,
360362
'23_loop_spaceship' => 50000000,
361-
'24_xmlrpc_encode' => 200000,
362-
'25_xmlrpc_decode' => 30000,
363363
'26_1_public' => 5000000,
364364
'26_2_getset' => 5000000,
365365
'26_3_magic' => 5000000,
@@ -657,7 +657,7 @@ function dumb_test_Functions()
657657

658658
$count = 100000;
659659
$time_start = get_microtime();
660-
$stringFunctions = array('strtoupper', 'strtolower', 'strlen', 'str_rot13', 'ord', 'mb_strlen', 'trim', 'md5', 'json_encode', 'xmlrpc_encode');
660+
$stringFunctions = array('strtoupper', 'strtolower', 'strlen', 'str_rot13', 'ord', 'mb_strlen', 'trim', 'md5', 'json_encode');
661661
foreach ($stringFunctions as $key => $function) {
662662
if (!function_exists($function)) {
663663
unset($stringFunctions[$key]);
@@ -1421,85 +1421,6 @@ function test_20_Type_Conversion()
14211421
}
14221422

14231423

1424-
function test_24_XmlRpc_Encode()
1425-
{
1426-
global $stringTest, $emptyResult, $testsLoopLimits, $totalOps;
1427-
1428-
if (!function_exists('xmlrpc_encode')) {
1429-
return $emptyResult;
1430-
}
1431-
1432-
$data = array(
1433-
// XmlRpc don't like html tags (php-7.2 + libxmlrpc-epi)
1434-
base64_encode($stringTest),
1435-
123456,
1436-
123.456,
1437-
array(123456),
1438-
null,
1439-
false,
1440-
);
1441-
$obj = new stdClass();
1442-
$obj->fieldStr = 'value';
1443-
$obj->fieldInt = 123456;
1444-
$obj->fieldFloat = 123.456;
1445-
$obj->fieldArray = array(123456);
1446-
$obj->fieldNull = null;
1447-
$obj->fieldBool = false;
1448-
$data[] = $obj;
1449-
1450-
$count = $testsLoopLimits['24_xmlrpc_encode'];
1451-
$time_start = get_microtime();
1452-
for ($i = 0; $i < $count; $i++) {
1453-
foreach ($data as $value) {
1454-
$r = xmlrpc_encode($value);
1455-
}
1456-
}
1457-
$totalOps += $count;
1458-
return format_result_test(get_microtime() - $time_start, $count, mymemory_usage());
1459-
}
1460-
1461-
function test_25_XmlRpc_Decode()
1462-
{
1463-
global $stringTest, $emptyResult, $testsLoopLimits, $totalOps;
1464-
1465-
if (!function_exists('xmlrpc_decode')) {
1466-
return $emptyResult;
1467-
}
1468-
1469-
$data = array(
1470-
// XmlRpc don't like html tags (php-7.2 + libxmlrpc-epi)
1471-
base64_encode($stringTest),
1472-
123456,
1473-
123.456,
1474-
array(123456),
1475-
null,
1476-
false,
1477-
);
1478-
$obj = new stdClass();
1479-
$obj->fieldStr = 'value';
1480-
$obj->fieldInt = 123456;
1481-
$obj->fieldFloat = 123.456;
1482-
$obj->fieldArray = array(123456);
1483-
$obj->fieldNull = null;
1484-
$obj->fieldBool = false;
1485-
$data[] = $obj;
1486-
1487-
foreach ($data as $key => $value) {
1488-
$data[$key] = xmlrpc_encode($value);
1489-
}
1490-
1491-
$count = $testsLoopLimits['25_xmlrpc_decode'];
1492-
$time_start = get_microtime();
1493-
for ($i = 0; $i < $count; $i++) {
1494-
foreach ($data as $value) {
1495-
$r = xmlrpc_decode($value);
1496-
}
1497-
}
1498-
$totalOps += $count;
1499-
return format_result_test(get_microtime() - $time_start, $count, mymemory_usage());
1500-
}
1501-
1502-
15031424
$functions = get_defined_functions();
15041425
sort($functions['user']);
15051426

@@ -1529,11 +1450,6 @@ function test_25_XmlRpc_Decode()
15291450
echo "<pre>Extenstion 'json' not loaded or not compiled! JSON tests will produce empty result!</pre>";
15301451
$has_json = "no";
15311452
}
1532-
$has_xmlrpc = "yes";
1533-
if (!function_exists('xmlrpc_encode')) {
1534-
echo "<pre>Extenstion 'xmlrpc' not loaded or not compiled! XmlRpc tests will procude empty result!</pre>";
1535-
$has_xmlrpc = "no";
1536-
}
15371453
$has_pcre = "yes";
15381454
if (!function_exists('preg_match')) {
15391455
echo "<pre>Extenstion 'pcre' not loaded or not compiled! Regex tests will procude empty result!</pre>";
@@ -1560,7 +1476,6 @@ function test_25_XmlRpc_Decode()
15601476
. str_pad("available modules", $padInfo, ' ', STR_PAD_LEFT) . " :\n"
15611477
. str_pad("mbstring", $padInfo, ' ', STR_PAD_LEFT) . " : $has_mbstring\n"
15621478
. str_pad("json", $padInfo, ' ', STR_PAD_LEFT) . " : $has_json\n"
1563-
. str_pad("xmlrpc", $padInfo, ' ', STR_PAD_LEFT) . " : $has_xmlrpc\n"
15641479
. str_pad("pcre", $padInfo, ' ', STR_PAD_LEFT) . " : $has_pcre\n"
15651480
. str_pad("Max execution time", $padInfo) . " : " . $maxTime . " sec\n"
15661481
. str_pad("Crypt hash algo", $padInfo) . " : " . $cryptAlgoName . "\n"

0 commit comments

Comments
 (0)