feat: count total-vertices and faces in benchmark
Some checks failed
📊 Benchmark the Runtime / release (pull_request) Failing after 1m21s
🚀 Lint & Test & Deploy / release (pull_request) Failing after 56s

This commit is contained in:
2026-04-24 21:35:33 +02:00
parent 09a9f8ce2c
commit 3dba3c2b39
2 changed files with 35 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ export interface PerformanceStore {
startRun(): void;
stopRun(): void;
addPoint(name: string, value?: number): void;
addToLastRun(name: string, value: number): void;
endPoint(name?: string): void;
mergeData(data: PerformanceData[number]): void;
get: () => PerformanceData;
@@ -63,6 +64,13 @@ export function createPerformanceStore(): PerformanceStore {
}
}
function addToLastRun(name: string, value: number) {
const last = data[data.length - 1];
if (!last) return;
last[name] = last[name] || [];
last[name].push(value);
}
function get() {
return data;
}
@@ -94,6 +102,7 @@ export function createPerformanceStore(): PerformanceStore {
startRun,
stopRun,
addPoint,
addToLastRun,
endPoint,
mergeData,
get