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:
17
app/src/lib/performance/PerformanceViewer.svelte
Normal file
17
app/src/lib/performance/PerformanceViewer.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import type { PerformanceStore } from ".";
|
||||
|
||||
export let store: PerformanceStore;
|
||||
|
||||
function getPerformanceData() {
|
||||
return Object.entries($store.total).sort((a, b) => b[1] - a[1]);
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $store.runs.length !== 0}
|
||||
{#each getPerformanceData() as [key, value]}
|
||||
<p>{key}: {Math.floor(value * 100) / 100}ms</p>
|
||||
{/each}
|
||||
{:else}
|
||||
<p>No runs available</p>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user