✨ CLI Loading server stats and traces
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"git.solsynth.dev/goatworks/roadsign/pkg/warden"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/samber/lo"
|
||||
"time"
|
||||
)
|
||||
|
||||
func getStats(c *fiber.Ctx) error {
|
||||
@ -23,5 +24,10 @@ func getStats(c *fiber.Ctx) error {
|
||||
"locations": len(locations),
|
||||
"destinations": len(destinations),
|
||||
"applications": len(applications),
|
||||
"uptime": time.Since(navi.R.Metrics.StartupAt).Milliseconds(),
|
||||
"traffic": fiber.Map{
|
||||
"total": navi.R.Metrics.TotalTraffic,
|
||||
"unique_client": len(navi.R.Metrics.TrafficFrom),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user