finished up the system statistics page

This commit is contained in:
2026-03-07 14:28:15 -07:00
parent 264a9a6b93
commit d216a0691c
3 changed files with 23 additions and 13 deletions
+4 -3
View File
@@ -4,11 +4,12 @@ After the point where it reaches feature parity with Venice circa 2006.
## Pre-Launch Polish
* Policy page support.
* User agreement in a separate file rather than directly in settings.
* ~~Policy page support.~~
* ~~User agreement in a separate file rather than directly in settings.~~
* Support all customizations that were done with the EMinds instance of Venice.
* Gitea-like status page showing Go-specific internals.
* ~~Gitea-like status page showing Go-specific internals.~~
* Build static Tailwind CSS file rather than using remote-loaded version. (Gate on debug/prod flag)
* Rate limiter.
## Immediate Cleanups Required
+9
View File
@@ -837,6 +837,15 @@ func SysStats(ctxt ui.AmContext) (string, any) {
ctxt.VarMap().Set("memHeapIdle", humanize.IBytes(mstat.HeapIdle))
ctxt.VarMap().Set("memHeapInuse", humanize.IBytes(mstat.HeapInuse))
ctxt.VarMap().Set("memHeapReleased", humanize.IBytes(mstat.HeapReleased))
ctxt.VarMap().Set("memStackInuse", humanize.IBytes(mstat.StackInuse))
ctxt.VarMap().Set("memStackSys", humanize.IBytes(mstat.StackSys))
ctxt.VarMap().Set("memMSpanInuse", humanize.IBytes(mstat.MSpanInuse))
ctxt.VarMap().Set("memMSpanSys", humanize.IBytes(mstat.MSpanSys))
ctxt.VarMap().Set("memMCacheInuse", humanize.IBytes(mstat.MCacheInuse))
ctxt.VarMap().Set("memMCacheSys", humanize.IBytes(mstat.MCacheSys))
ctxt.VarMap().Set("memBuckHashSys", humanize.IBytes(mstat.BuckHashSys))
ctxt.VarMap().Set("memGCSys", humanize.IBytes(mstat.GCSys))
ctxt.VarMap().Set("memOtherSys", humanize.IBytes(mstat.OtherSys))
ctxt.VarMap().Set("memLastGCTime", time.Unix(0, int64(mstat.LastGC)).Format(time.RFC3339))
ctxt.VarMap().Set("memTotalPause", fmt.Sprintf("%.3f ms", float64(mstat.PauseTotalNs)/1000/1000))
ctxt.VarMap().Set("memGCPercent", fmt.Sprintf("%.5f%%", float64(mstat.GCCPUFraction)*100))
+10 -10
View File
@@ -22,7 +22,7 @@
<!-- General Statistics -->
<h2 class="text-blue-800 text-2xl font-bold mb-2">General Statistics</h2>
<div class="overflow-x-auto mb-2">
<div class="mb-2">
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
<table class="w-xl space-x-4 table-fixed">
<tr>
@@ -51,7 +51,7 @@
<!-- Heap Statistics -->
<h2 class="text-blue-800 text-2xl font-bold mb-2">Heap Statistics</h2>
<div class="overflow-x-auto mb-2">
<div class="mb-2">
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
<table class="w-xl space-x-4 table-fixed">
<tr>
@@ -72,32 +72,32 @@
<!-- System Allocations -->
<h2 class="text-blue-800 text-2xl font-bold mb-2">System Allocations</h2>
<div class="overflow-x-auto mb-2">
<div class="mb-2">
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
<table class="w-xl space-x-4 table-fixed">
<tr>
<td class="font-bold text-sm px-4">Stack Usage</td>
<td class="text-sm px-4">{{ mstat.StackInuse }} in use ({{ mstat.StackSys }} from system)</td>
<td class="text-sm px-4">{{ memStackInuse }} in use ({{ memStackSys }} from system)</td>
</tr>
<tr>
<td class="font-bold text-sm px-4">MSpan Usage</td>
<td class="text-sm px-4">{{ mstat.MSpanInuse }} in use ({{ mstat.MSpanSys }} from system)</td>
<td class="text-sm px-4">{{ memMSpanInuse }} in use ({{ memMSpanSys }} from system)</td>
</tr>
<tr>
<td class="font-bold text-sm px-4">MCache Usage</td>
<td class="text-sm px-4">{{ mstat.MCacheInuse }} in use ({{ mstat.MCacheSys }} from system)</td>
<td class="text-sm px-4">{{ memMCacheInuse }} in use ({{ memMCacheSys }} from system)</td>
</tr>
<tr>
<td class="font-bold text-sm px-4">Bucket Hashtable Usage</td>
<td class="text-sm px-4">{{ mstat.BuckHashSys }}</td>
<td class="text-sm px-4">{{ memBuckHashSys }}</td>
</tr>
<tr>
<td class="font-bold text-sm px-4">GC Usage</td>
<td class="text-sm px-4">{{ mstat.GCSys }}</td>
<td class="text-sm px-4">{{ memGCSys }}</td>
</tr>
<tr>
<td class="font-bold text-sm px-4">Miscellaneous Usage</td>
<td class="text-sm px-4">{{ mstat.OtherSys }}</td>
<td class="text-sm px-4">{{ memOtherSys }}</td>
</tr>
</table>
</div>
@@ -105,7 +105,7 @@
<!-- GC Statistics -->
<h2 class="text-blue-800 text-2xl font-bold mb-2">GC Statistics</h2>
<div class="overflow-x-auto mb-2">
<div class="mb-2">
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
<table class="w-xl space-x-4 table-fixed">
<tr>