diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-13 08:50:04 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-13 08:50:04 +0900 |
| commit | 6ab8cb690303177200dc59550da972b36e7cfd18 (patch) | |
| tree | 4bac7d04ebe9ef20a0f8e86360c099ddbf163fb3 /examples | |
| parent | 461fa9cfbcf51609caa2b14b723ceb3df0bf62ce (diff) | |
| download | php-waddiwasi-6ab8cb690303177200dc59550da972b36e7cfd18.tar.gz php-waddiwasi-6ab8cb690303177200dc59550da972b36e7cfd18.tar.zst php-waddiwasi-6ab8cb690303177200dc59550da972b36e7cfd18.zip | |
feat: record memory usage
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/php-on-wasm/php-wasm.php | 1 |
1 files changed, 1 insertions, 0 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. |
