sk_gm_server/test/api_benchmark.go

20 lines
303 B
Go
Raw Normal View History

2023-03-20 13:38:28 +08:00
package main
import (
"github.com/gogf/gf/net/ghttp"
"testing"
)
const (
BenchmarkURL = "http://127.0.0.1:80"
)
func BenchmarkLogGet(b *testing.B) {
if r, e := ghttp.Get(BenchmarkURL + "/log/access?name=john&age=18"); e != nil {
b.Log(e)
} else {
b.Log(string(r.ReadAll()))
r.Close()
}
}