From bb830658e00105e98564bb9dc459078981a750e0 Mon Sep 17 00:00:00 2001 From: wood chen Date: Sat, 30 Nov 2024 21:23:17 +0800 Subject: [PATCH] feat(metrics): add comprehensive metrics display for uptime, request counts, and performance indicators --- internal/handler/metrics.go | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/internal/handler/metrics.go b/internal/handler/metrics.go index e23c4da..e3506c3 100644 --- a/internal/handler/metrics.go +++ b/internal/handler/metrics.go @@ -296,6 +296,59 @@ var metricsTemplate = ` +

Proxy-Go Metrics

+ +
+

基础指标

+
+ 运行时间 + +
+
+ 当前活跃请求 + +
+
+ 总请求数 + +
+
+ 错误数 + +
+
+ 错误率 + +
+
+ +
+

系统指标

+
+ Goroutine数量 + +
+
+ 内存使用 + +
+
+ +
+

性能指标

+
+ 平均响应时间 + +
+
+ 每秒请求数 + +
+
+ + + +