aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Execution
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-14 11:23:27 +0900
committernsfisis <nsfisis@gmail.com>2024-03-14 11:23:27 +0900
commite58d003863b82cb895d8ee4d0b506d453c88b51f (patch)
treef119dcc38fcb015daab3b2748405c38fa4525866 /src/Execution
parentbae8cf7a0287442e7e822a194d2b6eba8c32552c (diff)
downloadphp-waddiwasi-e58d003863b82cb895d8ee4d0b506d453c88b51f.tar.gz
php-waddiwasi-e58d003863b82cb895d8ee4d0b506d453c88b51f.tar.zst
php-waddiwasi-e58d003863b82cb895d8ee4d0b506d453c88b51f.zip
perf: log more metrics
Diffstat (limited to 'src/Execution')
-rw-r--r--src/Execution/Runtime.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Execution/Runtime.php b/src/Execution/Runtime.php
index 1efaacc..19d5771 100644
--- a/src/Execution/Runtime.php
+++ b/src/Execution/Runtime.php
@@ -24,7 +24,7 @@ use function is_int;
final class Runtime
{
/**
- * @var array<string, int>
+ * @var array<string, array{int, int}>
*/
private array $instrMetrics = [];
@@ -157,7 +157,7 @@ final class Runtime
}
/**
- * @return array<string, int>
+ * @return array<string, array{int, int}>
*/
public function getInstrMetrics(): array
{
@@ -538,8 +538,9 @@ final class Runtime
default => throw new RuntimeException("invalid instruction"),
};
- // $this->instrMetrics[$instr::opName()] ??= 0;
- // $this->instrMetrics[$instr::opName()] += hrtime(true) - $start;
+ // $this->instrMetrics[$instr::opName()] ??= [0, 0];
+ // $this->instrMetrics[$instr::opName()][0] += 1;
+ // $this->instrMetrics[$instr::opName()][1] += hrtime(true) - $start;
return $result;
}