"flag"
"fmt"
"io"
+ "math"
"net/http"
"net/url"
"os"
t.ReqPool = pool.New(
func() *reqf.Req {
+ // if pc, file, line, ok := runtime.Caller(2); ok {
+ // fmt.Printf("call by %s\n\t%s:%d\n", runtime.FuncForPC(pc).Name(), file, line)
+ // }
return reqf.New()
},
func(t *reqf.Req) bool {
return t.IsLive()
},
func(t *reqf.Req) *reqf.Req {
+ // if pc, file, line, ok := runtime.Caller(2); ok {
+ // fmt.Printf("call by %s\n\t%s:%d\n", runtime.FuncForPC(pc).Name(), file, line)
+ // }
return t
},
func(t *reqf.Req) *reqf.Req {
"inuse": reqState[2],
"nouse": reqState[3],
"sum": reqState[4],
- "qts": reqState[5],
+ "qts": math.Round(reqState[5].(float64)*100) / 100,
},
"numGoroutine": runtime.NumGoroutine(),
"goVersion": runtime.Version(),