MCPcopy Create free account
hub / github.com/devfeel/dotweb / showIntervalDataJson

Function showIntervalDataJson

dotweb_sysgroup.go:45–58  ·  view source on GitHub ↗
(ctx Context)

Source from the content-addressed store, hash-verified

43}
44
45func showIntervalDataJson(ctx Context) error {
46 type data struct {
47 Time string
48 RequestCount uint64
49 ErrorCount uint64
50 }
51 queryKey := ctx.QueryString("querykey")
52
53 d := new(data)
54 d.Time = queryKey
55 d.RequestCount = ctx.HttpServer().StateInfo().QueryIntervalRequestData(queryKey)
56 d.ErrorCount = ctx.HttpServer().StateInfo().QueryIntervalErrorData(queryKey)
57 return ctx.WriteJson(d)
58}
59
60func showIntervalDataPretty(ctx Context) error {
61 type data struct {

Callers 1

showIntervalDataFunction · 0.85

Calls 6

QueryStringMethod · 0.65
HttpServerMethod · 0.65
WriteJsonMethod · 0.65
StateInfoMethod · 0.45

Tested by

no test coverage detected