X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php83-pecl-scoutapm_1.10.0-1.el8/tests
opt
/
alt
/
tests
/
alt-php83-pecl-scoutapm_1.10.0-1.el8
/
tests
/
ðŸ“
..
📄
001-check-ext-loaded.phpt
(375 B)
📄
002-file_get_contents.phpt
(701 B)
📄
003-scoutapm_get_calls-clears-calls-list.phpt
(480 B)
📄
004-namespaced-fgc-is-not-logged.phpt
(1.66 KB)
📄
005-requiring-external-files-handled.phpt
(292 B)
📄
006-anonymous-classes-handled.phpt
(349 B)
📄
007-evaled-code-handled.phpt
(289 B)
📄
008-class-with-no-constructor-call-handled.phpt
(275 B)
📄
009-curl_exec.phpt
(892 B)
📄
010-fwrite-fread-fopen.phpt
(894 B)
📄
010-fwrite-fread-tmpfile.phpt
(876 B)
📄
011-pdo-exec.phpt
(910 B)
📄
011-pdo-query.phpt
(814 B)
📄
011-pdostatement-execute-pdo-prepare.phpt
(1.05 KB)
📄
012-file_put_contents.phpt
(668 B)
📄
013-fix-memory-leak-when-scoutapm_get_calls-not-called.phpt
(510 B)
📄
014-predis-support.phpt
(4 KB)
📄
015-phpredis-support.phpt
(3.13 KB)
📄
016-memcached-support.phpt
(4.36 KB)
📄
017-elastic-7-support.phpt
(2.24 KB)
📄
018-do-not-instrument-by-default.phpt
(694 B)
📄
019-url-method-capture-fgc.phpt
(942 B)
📄
020-url-method-capture-curl-post.phpt
(887 B)
📄
021-url-method-capture-curl-customreq.phpt
(914 B)
📄
022-elastic-8-support.phpt
(2.63 KB)
📄
bug-47.phpt
(545 B)
📄
bug-49.phpt
(589 B)
📄
bug-55.phpt
(855 B)
📄
bug-71.phpt
(704 B)
📄
bug-88.phpt
(979 B)
📄
bug-93.phpt
(530 B)
📄
external.inc
(50 B)
Editing: bug-88.phpt
--TEST-- Bug https://github.com/scoutapp/scout-apm-php-ext/issues/88 - memory usage should not increase when no instrumentation happens --SKIPIF-- <?php if (!extension_loaded("scoutapm")) die("skip scoutapm extension required."); ?> <?php /* PHP_OS_FAMILY === "Windows" - needs PHP 7.2+ */ if (stripos(PHP_OS, 'Win') === 0) die("skip not for Windows."); ?> --FILE-- <?php class A { function b() {} } $a = new A(); scoutapm_enable_instrumentation(true); $before = (int) (exec("ps --pid " . getmypid() . " --no-headers -o rss")); for ($i = 0; $i <= 10000000; $i++) { $a->b(); } $after = (int) (exec("ps --pid " . getmypid() . " --no-headers -o rss")); echo "Before & after:\n"; var_dump($before, $after); echo "Difference:\n"; var_dump($after - $before); $threshold = 500; // bytes echo "Within $threshold bytes limit:\n"; var_dump(($after - $before) < $threshold); ?> --EXPECTF-- Before & after: int(%d) int(%d) Difference: int(%d) Within %d bytes limit: bool(true)
Upload File
Create Folder