diff options
| -rw-r--r-- | examples/php-on-wasm/php-wasm.php | 1 | ||||
| -rw-r--r-- | prof.sh | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/examples/php-on-wasm/php-wasm.php b/examples/php-on-wasm/php-wasm.php index f1a26fb..75e9c3f 100644 --- a/examples/php-on-wasm/php-wasm.php +++ b/examples/php-on-wasm/php-wasm.php @@ -152,6 +152,7 @@ assert($result->inner instanceof Nums\I32); $exitCode = $result->inner->value; fprintf(STDERR, "Exit code: $exitCode\n"); +fprintf(STDERR, "Memory peak usage: %s\n", memory_get_peak_usage()); function allocateStringOnWasmMemory(Runtime $runtime, string $str): int { // Plus 1 for the null terminator in C. @@ -1,3 +1,3 @@ timestamp="$(date '+%Y%m%d-%H%M')" -php -d 'error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED' vendor/bin/reli inspector:trace -o traces/"$timestamp".log -- php -d memory_limit=4G -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php +php -d 'error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED' vendor/bin/reli inspector:trace -o traces/"$timestamp".log -- php -d memory_limit=4G -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2> traces/"$timestamp".stderr.log vendor/bin/reli converter:flamegraph < traces/"$timestamp".log > traces/"$timestamp".svg |
