From 1841de707770999e41c573886390db14153c1834 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 16 Aug 2019 16:33:19 +0800 Subject: [PATCH] Update server.go --- component/session/server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/component/session/server.go b/component/session/server.go index 451b5c8..5d86976 100644 --- a/component/session/server.go +++ b/component/session/server.go @@ -7,6 +7,7 @@ import ( "io" "net" "net/http" + "runtime" "sort" "sync" "sync/atomic" @@ -95,18 +96,19 @@ table, th, td { _, _ = fmt.Fprintf(w, "

Go-tun2socks %s

", C.Version) // Statistics table - _, _ = fmt.Fprintf(w, "

Statistics

") + _, _ = fmt.Fprintf(w, "

Statistics (%d)

", runtime.NumGoroutine()) _, _ = fmt.Fprintf(w, "") - _, _ = fmt.Fprintf(w, "\n") + _, _ = fmt.Fprintf(w, "\n") trafficUp := atomic.LoadInt64(&s.trafficUp) trafficDown := atomic.LoadInt64(&s.trafficDown) - _, _ = fmt.Fprintf(w, "\n", + _, _ = fmt.Fprintf(w, "\n", date(time.Now()), uptime(), byteCountSI(trafficUp+trafficDown), byteCountSI(trafficUp), byteCountSI(trafficDown), ) + runtime.NumGoroutine() _, _ = fmt.Fprintf(w, "
Latest RefreshUptimeTotal TrafficUploadDownload
Last Refresh TimeUptimeTotalUploadDownload
%s%s%s%s%s
%v%v%v%v%v
") // Session table