diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-14 11:23:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-14 11:23:27 +0900 |
| commit | e58d003863b82cb895d8ee4d0b506d453c88b51f (patch) | |
| tree | f119dcc38fcb015daab3b2748405c38fa4525866 /examples | |
| parent | bae8cf7a0287442e7e822a194d2b6eba8c32552c (diff) | |
| download | php-waddiwasi-e58d003863b82cb895d8ee4d0b506d453c88b51f.tar.gz php-waddiwasi-e58d003863b82cb895d8ee4d0b506d453c88b51f.tar.zst php-waddiwasi-e58d003863b82cb895d8ee4d0b506d453c88b51f.zip | |
perf: log more metrics
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/php-on-wasm/php-wasm.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/php-on-wasm/php-wasm.php b/examples/php-on-wasm/php-wasm.php index 54f6561..cf7e328 100644 --- a/examples/php-on-wasm/php-wasm.php +++ b/examples/php-on-wasm/php-wasm.php @@ -149,8 +149,8 @@ assert(is_int($exitCode)); fprintf(STDERR, "Exit code: $exitCode\n"); fprintf(STDERR, "Memory peak usage: %s\n", memory_get_peak_usage()); fprintf(STDERR, "\n\n"); -foreach ($runtime->getInstrMetrics() as $instr => $count) { - fprintf(STDERR, "%s: %d\n", $instr, $count); +foreach ($runtime->getInstrMetrics() as $instr => [$count, $time]) { + fprintf(STDERR, "%s: %d %d %f\n", $instr, $time, $count, $time / $count); } function allocateStringOnWasmMemory(Runtime $runtime, string $str): int { |
