aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/admin/perftrace.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/admin/perftrace.go')
-rw-r--r--routers/web/admin/perftrace.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/routers/web/admin/perftrace.go b/routers/web/admin/perftrace.go
new file mode 100644
index 0000000000..51ee57da10
--- /dev/null
+++ b/routers/web/admin/perftrace.go
@@ -0,0 +1,18 @@
+// Copyright 2025 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package admin
+
+import (
+ "net/http"
+
+ "code.gitea.io/gitea/modules/tailmsg"
+ "code.gitea.io/gitea/services/context"
+)
+
+func PerfTrace(ctx *context.Context) {
+ monitorTraceCommon(ctx)
+ ctx.Data["PageIsAdminMonitorPerfTrace"] = true
+ ctx.Data["PerfTraceRecords"] = tailmsg.GetManager().GetTraceRecorder().GetRecords()
+ ctx.HTML(http.StatusOK, tplPerfTrace)
+}