PATH:
opt
/
alt
/
tests
/
alt-php55-pecl-xhprof-tideways_4.1.6-2.el8
/
tests
<?php /** * Print xhprof raw data (essentially a callgraph) in a canonical style, * so that even if the ordering of things within the raw_data (which is * an associative array) changes in future implementations the output * remains stable. * * Also, suppress output of variable quantities (such as time, memory) * so that reference output of tests doesn't need any additional masking. * * @author Kannan */ function print_canonical($xhprof_data) { // some functions are not part of the trace // due to being an opcode in php7, these // need to be ignored for a common test-output $ignoreFunctions = array('strlen', 'is_array'); ksort($xhprof_data); foreach($xhprof_data as $func => $metrics) { foreach ($ignoreFunctions as $ignoreFunction) { if (strpos($func, "==>" . $ignoreFunction) !== false) { continue 2; } } echo str_pad($func, 40) . ":"; ksort($metrics); foreach ($metrics as $name => $value) { // Only call counts are stable. // Wild card everything else. We still print // the metric name to ensure it was collected. if ($name != "ct") { $value = "*"; } else { $value = str_pad($value, 8, " ", STR_PAD_LEFT); } echo " {$name}={$value};"; } echo "\n"; } } function print_spans($spans) { foreach ($spans as $span) { if (!isset($span['a'])) { $span['a'] = array(); } ksort($span['a']); $annotations = ''; foreach ($span['a'] as $k => $v) { if ($k === 'fn') { continue; } $annotations .= "$k=$v "; } printf("%s: %d timers - %s\n", $span['n'], count($span['b']), rtrim($annotations)); } } /** * Code is from https://github.com/php/php-src/blob/master/ext/curl/tests/server.inc licensed under PHP license */ define ("PHP_HTTP_SERVER_HOSTNAME", "localhost"); define ("PHP_HTTP_SERVER_PORT", 8964); define ("PHP_HTTP_SERVER_ADDRESS", PHP_HTTP_SERVER_HOSTNAME.":".PHP_HTTP_SERVER_PORT); function http_cli_server_start() { if(getenv('PHP_HTTP_HTTP_REMOTE_SERVER')) { return getenv('PHP_HTTP_HTTP_REMOTE_SERVER'); } $php_executable = getenv('TEST_PHP_EXECUTABLE'); $doc_root = __DIR__; $router = "http_responder.php"; $descriptorspec = array( 0 => STDIN, 1 => STDOUT, 2 => STDERR, ); if (substr(PHP_OS, 0, 3) == 'WIN') { $cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_HTTP_SERVER_ADDRESS; $cmd .= " {$router}"; $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true)); } else { $cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_HTTP_SERVER_ADDRESS; $cmd .= " {$router}"; $cmd .= " 2>/dev/null"; $handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root); } // note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.' // it might not be listening yet...need to wait until fsockopen() call returns $i = 0; while (($i++ < 30) && !($fp = @fsockopen(PHP_HTTP_SERVER_HOSTNAME, PHP_HTTP_SERVER_PORT))) { usleep(10000); } if ($fp) { fclose($fp); } register_shutdown_function( function($handle) use($router) { proc_terminate($handle); }, $handle ); // don't bother sleeping, server is already up // server can take a variable amount of time to be up, so just sleeping a guessed amount of time // does not work. this is why tests sometimes pass and sometimes fail. to get a reliable pass // sleeping doesn't work. return PHP_HTTP_SERVER_ADDRESS; }
[-] tideways_events2.php
[edit]
[-] tideways_spans_032.phpt
[edit]
[-] tideways_003.phpt
[edit]
[-] tideways_spans_022.phpt
[edit]
[-] tideways_036.phpt
[edit]
[-] tideways_spans_014.phpt
[edit]
[-] tideways_spans_017.phpt
[edit]
[-] tideways_tranaction_cakephp3.phpt
[edit]
[-] tideways_errors_004.phpt
[edit]
[-] tideways_spans_019.phpt
[edit]
[-] common_predis.php
[edit]
[-] tideways_007.phpt
[edit]
[-] tideways_errors_002.phpt
[edit]
[-] tideways_spans_027.phpt
[edit]
[-] tideways_005.phpt
[edit]
[-] tideways_spans_025.phpt
[edit]
[-] tideways_spans_018.phpt
[edit]
[-] tideways_events1.php
[edit]
[-] tideways_spans_021.phpt
[edit]
[-] tideways_038.phpt
[edit]
[-] tideways_spans_020.phpt
[edit]
[-] memleak.phpt
[edit]
[-] tideways_023_classes.php
[edit]
[-] tideways_018.phpt
[edit]
[-] http_responder.php
[edit]
[-] tideways_037.phpt
[edit]
[-] tideways_fw_magento_001.phpt
[edit]
[-] tideways_spans_004.phpt
[edit]
[-] tideways_spans_005.phpt
[edit]
[-] tideways_spans_003.phpt
[edit]
[-] tideways_fw_wordpress_001.phpt
[edit]
[-] tideways_spans_007.phpt
[edit]
[-] tideways_039.phpt
[edit]
[-] tideways_spans_030.phpt
[edit]
[-] tideways_spans_031.phpt
[edit]
[-] tideways_004_inc.php
[edit]
[-] tideways_spans_013.phpt
[edit]
[-] tideways_spans_016.phpt
[edit]
[-] tideways_sql_001.phpt
[edit]
[-] tideways_040.phpt
[edit]
[-] tideways_spans_035.phpt
[edit]
[-] tideways_fw_symfony_002.phpt
[edit]
[-] tideways_fw_shopware_001.phpt
[edit]
[-] tideways_spans_015.phpt
[edit]
[-] tideways_001.phpt
[edit]
[-] tideways_spans_024.phpt
[edit]
[-] tideways_spans_026.phpt
[edit]
[-] tideways_doctrine.php
[edit]
[-] tideways_009.phpt
[edit]
[-] tideways_tranaction_cakephp2.phpt
[edit]
[-] tideways_spans_023.phpt
[edit]
[-] tideways_spans_001.phpt
[edit]
[-] tideways_024.phpt
[edit]
[-] tideways_023.phpt
[edit]
[-] tideways_fw_options.phpt
[edit]
[-] tideways_spans_002.phpt
[edit]
[-] tideways_queue.php
[edit]
[-] tideways_symfony3.php
[edit]
[-] tideways_spans_036.phpt
[edit]
[-] tideways_029.phpt
[edit]
[-] tideways_spans_028.phpt
[edit]
[-] tideways_transaction_yii.phpt
[edit]
[-] tideways_004.phpt
[edit]
[-] tideways_spans_012.phpt
[edit]
[-] tideways_026.phpt
[edit]
[-] tideways_002.phpt
[edit]
[-] tideways_004_require.php
[edit]
[-] tideways_symfony.php
[edit]
[-] tideways_errors_005.phpt
[edit]
[-] tideways_spans_006.phpt
[edit]
[-] tideways_errors_001.phpt
[edit]
[+]
..
[-] tideways_spans_008.phpt
[edit]
[-] tideways_039_prepend.php
[edit]
[-] tideways_fw_oxid_001.phpt
[edit]
[-] tideways_spans_009.phpt
[edit]
[-] tideways_errors_003.phpt
[edit]
[-] common.php
[edit]
[-] tideways_035.phpt
[edit]
[-] tideways_spans_029.phpt
[edit]
[-] tideways_fw_zend1.phpt
[edit]
[-] elasticsearch.php
[edit]
[-] tideways_transaction_yii2.phpt
[edit]