From 0757665420ec8bea13c2e8aacf68c9be743f0edd Mon Sep 17 00:00:00 2001 From: Dannii Willis Date: Thu, 24 Oct 2024 10:40:54 +1000 Subject: [PATCH] Time how long measure takes --- src/glkote/web/metrics.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glkote/web/metrics.ts b/src/glkote/web/metrics.ts index 784fcb0..0fb94d8 100644 --- a/src/glkote/web/metrics.ts +++ b/src/glkote/web/metrics.ts @@ -174,7 +174,10 @@ export default class Metrics { return } const oldmetrics = Object.assign({}, this.metrics) + let before = Date.now() await this.measure() + let after = Date.now() + alert(`measure() took ${after - before}ms`) if (metrics_differ(this.metrics, oldmetrics)) { this.glkote.send_event({type: 'arrange'}) }