X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php83-pecl-xhprof-tideways_5.0.4-2.el8/tests
opt
/
alt
/
tests
/
alt-php83-pecl-xhprof-tideways_5.0.4-2.el8
/
tests
/
ðŸ“
..
📄
common.php
(1.56 KB)
📄
xhprof_001.phpt
(4.62 KB)
📄
xhprof_001.phpt.php82-tests-fix
(4.03 KB)
📄
xhprof_002.phpt
(2.01 KB)
📄
xhprof_002.phpt.php82-tests-fix
(1.87 KB)
📄
xhprof_003.phpt
(1.49 KB)
📄
xhprof_003.phpt.php82-tests-fix
(1.42 KB)
📄
xhprof_004.phpt
(639 B)
📄
xhprof_004.phpt.php82-tests-fix
(567 B)
📄
xhprof_005.phpt
(199 B)
📄
xhprof_006.phpt
(968 B)
📄
xhprof_006.phpt.php82-tests-fix
(896 B)
📄
xhprof_007.phpt
(1.17 KB)
📄
xhprof_007.phpt.php82-tests-fix
(1000 B)
📄
xhprof_008.inc
(97 B)
📄
xhprof_008.phpt
(770 B)
📄
xhprof_008.phpt.php82-tests-fix
(577 B)
Editing: xhprof_001.phpt
--TEST-- Tideways: Basic Profiling Test --FILE-- <?php include_once dirname(__FILE__).'/common.php'; function bar() { return 1; } function foo($x) { $sum = 0; for ($idx = 0; $idx < 2; $idx++) { $sum += bar(); } return strlen("hello: {$x}"); } // 1: Sanity test a simple profile run tideways_xhprof_enable(); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 1: Default Flags\n"; print_canonical($output); echo "\n"; // 2: Sanity test profiling options tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_CPU); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 2: CPU\n"; print_canonical($output); echo "\n"; // 3: Sanity test profiling options tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_NO_BUILTINS); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 3: No Builtins\n"; print_canonical($output); echo "\n"; // 4: Sanity test profiling options tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_MEMORY); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 4: Memory\n"; print_canonical($output); echo "\n"; // 5: Sanity test combo of profiling options tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_MEMORY + TIDEWAYS_XHPROF_FLAGS_CPU); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 5: Memory & CPU\n"; print_canonical($output); echo "\n"; // 6: Sanity test extended memory profiling tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_MEMORY_ALLOC); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 6: Extended Memory Profiling\n"; print_canonical($output); echo "\n"; // 7: Sanity test extended memory profiling as mu tideways_xhprof_enable(TIDEWAYS_XHPROF_FLAGS_MEMORY_ALLOC_AS_MU); foo("this is a test"); $output = tideways_xhprof_disable(); echo "Part 7: Extended Memory Profiling as mu\n"; print_canonical($output); echo "\n"; ?> --EXPECT-- Part 1: Default Flags foo : ct= 1; wt=*; foo==>bar : ct= 2; wt=*; main() : ct= 1; wt=*; tideways_xhprof_disable : ct= 1; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; wt=*; Part 2: CPU foo : cpu=*; ct= 1; wt=*; foo==>bar : cpu=*; ct= 2; wt=*; main() : cpu=*; ct= 1; wt=*; tideways_xhprof_disable : cpu=*; ct= 1; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: cpu=*; ct= 1; wt=*; Part 3: No Builtins foo : ct= 1; wt=*; foo==>bar : ct= 2; wt=*; main() : ct= 1; wt=*; tideways_xhprof_disable : ct= 1; wt=*; Part 4: Memory foo : ct= 1; mu=*; pmu=*; wt=*; foo==>bar : ct= 2; mu=*; pmu=*; wt=*; main() : ct= 1; mu=*; pmu=*; wt=*; tideways_xhprof_disable : ct= 1; mu=*; pmu=*; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; mu=*; pmu=*; wt=*; Part 5: Memory & CPU foo : cpu=*; ct= 1; mu=*; pmu=*; wt=*; foo==>bar : cpu=*; ct= 2; mu=*; pmu=*; wt=*; main() : cpu=*; ct= 1; mu=*; pmu=*; wt=*; tideways_xhprof_disable : cpu=*; ct= 1; mu=*; pmu=*; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: cpu=*; ct= 1; mu=*; pmu=*; wt=*; Part 6: Extended Memory Profiling foo : ct= 1; mem.aa=*; mem.na=*; mem.nf=*; wt=*; foo==>bar : ct= 2; mem.aa=*; mem.na=*; mem.nf=*; wt=*; main() : ct= 1; mem.aa=*; mem.na=*; mem.nf=*; wt=*; tideways_xhprof_disable : ct= 1; mem.aa=*; mem.na=*; mem.nf=*; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; mem.aa=*; mem.na=*; mem.nf=*; wt=*; Part 7: Extended Memory Profiling as mu foo : ct= 1; mem.aa=*; mem.na=*; mem.nf=*; mu=*; wt=*; foo==>bar : ct= 2; mem.aa=*; mem.na=*; mem.nf=*; mu=*; wt=*; main() : ct= 1; mem.aa=*; mem.na=*; mem.nf=*; mu=*; wt=*; tideways_xhprof_disable : ct= 1; mem.aa=*; mem.na=*; mem.nf=*; mu=*; wt=*; tideways_xhprof_disable==>tideways_xhprof_disable@1: ct= 1; mem.aa=*; mem.na=*; mem.nf=*; mu=*; wt=*;
Upload File
Create Folder