|
|
@@ -3,9 +3,9 @@ package httpclent
|
|
|
import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
- "gitea.ckfah.com/cjjy/gocommon/pkg/boot"
|
|
|
- "gitea.ckfah.com/cjjy/gocommon/pkg/conf"
|
|
|
- "gitea.ckfah.com/cjjy/gocommon/pkg/logger"
|
|
|
+ "git.shuncheng.lu/bigthing/gocommon/pkg/boot"
|
|
|
+ "git.shuncheng.lu/bigthing/gocommon/pkg/conf"
|
|
|
+ "git.shuncheng.lu/bigthing/gocommon/pkg/logger"
|
|
|
"net/http"
|
|
|
"net/url"
|
|
|
"testing"
|
|
|
@@ -25,10 +25,10 @@ func initLogger() {
|
|
|
➜ httpclent git:(master) ✗ go test -v -run=none -bench=BenchmarkLoadDefaultOp -benchmem .
|
|
|
goos: darwin
|
|
|
goarch: amd64
|
|
|
-pkg: gitea.ckfah.com/cjjy/gocommon/pkg/net/httpclent
|
|
|
+pkg: git.shuncheng.lu/bigthing/gocommon/pkg/net/httpclent
|
|
|
BenchmarkLoadDefaultOp-12 52315970 23.3 ns/op 0 B/op 0 allocs/op
|
|
|
PASS
|
|
|
-ok gitea.ckfah.com/cjjy/gocommon/pkg/net/httpclent 1.257s
|
|
|
+ok git.shuncheng.lu/bigthing/gocommon/pkg/net/httpclent 1.257s
|
|
|
*/
|
|
|
func BenchmarkLoadDefaultOp(b *testing.B) {
|
|
|
for i := 0; i < b.N; i++ {
|
|
|
@@ -41,10 +41,10 @@ func BenchmarkLoadDefaultOp(b *testing.B) {
|
|
|
➜ httpclent git:(master) ✗ go test -v -run=none -bench=BenchmarkNewOp -benchmem .
|
|
|
goos: darwin
|
|
|
goarch: amd64
|
|
|
-pkg: gitea.ckfah.com/cjjy/gocommon/pkg/net/httpclent
|
|
|
+pkg: git.shuncheng.lu/bigthing/gocommon/pkg/net/httpclent
|
|
|
BenchmarkNewOp-12 20625889 62.5 ns/op 112 B/op 1 allocs/op
|
|
|
PASS
|
|
|
-ok gitea.ckfah.com/cjjy/gocommon/pkg/net/httpclent 1.368s
|
|
|
+ok git.shuncheng.lu/bigthing/gocommon/pkg/net/httpclent 1.368s
|
|
|
*/
|
|
|
func BenchmarkNewOp(b *testing.B) {
|
|
|
for i := 0; i < b.N; i++ {
|
|
|
@@ -107,10 +107,10 @@ func TestHttpRequestAndDecode(t *testing.T) {
|
|
|
go test -run=none -bench=Benchmark_addThirdLog -benchmem ./pkg/net/httpclent -o ./bin/Benchmark_addThirdLog
|
|
|
goos: darwin
|
|
|
goarch: amd64
|
|
|
-pkg: gitea.ckfah.com/cjjy/gocommon/pkg/net/httpclent
|
|
|
+pkg: git.shuncheng.lu/bigthing/gocommon/pkg/net/httpclent
|
|
|
Benchmark_addThirdLog-12 30000 37131 ns/op 1602 B/op 18 allocs/op
|
|
|
PASS
|
|
|
-ok gitea.ckfah.com/cjjy/gocommon/pkg/net/httpclent 1.445s
|
|
|
+ok git.shuncheng.lu/bigthing/gocommon/pkg/net/httpclent 1.445s
|
|
|
|
|
|
*/
|
|
|
func Benchmark_addThirdLog(b *testing.B) {
|