feat: add simple performance tracker
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m23s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m23s
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
<script lang="ts">
|
||||
import Grid from "$lib/grid";
|
||||
import GraphInterface from "$lib/graph-interface";
|
||||
import { MemoryRuntimeExecutor } from "$lib/runtime-executor";
|
||||
import {
|
||||
MemoryRuntimeExecutor,
|
||||
MemoryRuntimeCache,
|
||||
} from "$lib/runtime-executor";
|
||||
import { RemoteNodeRegistry } from "$lib/node-registry-client";
|
||||
import * as templates from "$lib/graph-templates";
|
||||
import type { Graph, Node } from "@nodes/types";
|
||||
@ -22,9 +25,15 @@
|
||||
import type { PerspectiveCamera, Vector3 } from "three";
|
||||
import type { OrbitControls } from "three/examples/jsm/Addons.js";
|
||||
import ActiveNode from "$lib/settings/panels/ActiveNode.svelte";
|
||||
import { createPerformanceStore } from "$lib/performance";
|
||||
import PerformanceViewer from "$lib/performance/PerformanceViewer.svelte";
|
||||
|
||||
const nodePerformance = createPerformanceStore();
|
||||
|
||||
const runtimeCache = new MemoryRuntimeCache();
|
||||
const nodeRegistry = new RemoteNodeRegistry("");
|
||||
const runtimeExecutor = new MemoryRuntimeExecutor(nodeRegistry);
|
||||
const runtimeExecutor = new MemoryRuntimeExecutor(nodeRegistry, runtimeCache);
|
||||
runtimeExecutor.perf = nodePerformance;
|
||||
|
||||
globalThis.decode = decodeNestedArray;
|
||||
globalThis.encode = encodeNestedArray;
|
||||
@ -96,6 +105,12 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
performance: {
|
||||
id: "performance",
|
||||
icon: "i-tabler-brand-speedtest",
|
||||
props: { store: nodePerformance, title: "Runtime Performance" },
|
||||
component: PerformanceViewer,
|
||||
},
|
||||
activeNode: {
|
||||
id: "Active Node",
|
||||
icon: "i-tabler-adjustments",
|
||||
|
Reference in New Issue
Block a user