From e58d003863b82cb895d8ee4d0b506d453c88b51f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 14 Mar 2024 11:23:27 +0900 Subject: perf: log more metrics --- examples/php-on-wasm/php-wasm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/php-on-wasm') 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 { -- cgit v1.2.3-70-g09d2