GO语言常用时间工具类 timeUtil.go
摘要:package util import "time" /**获取时间戳(纳秒)Testner 20210123*/func GetTime_UnixNano() string{ currentTime := time.Now() // fmt.Println("时间戳(纳秒):", now.Unix
阅读全文
GO语言HTTP请求案例--httpUtil.go
摘要:package util import ( "bytes" "fmt" "io/ioutil" "log" "net/http") /** 发送的POST请求 需要设置header Testner 20210123 */func Post_Json(url string, bodyJson stri
阅读全文
golang 性能测试
摘要:格式: func BenchmarkXxx(b *testing.B) 简单代码: package examples import ( "io/ioutil" "net/http" "testing" ) // 测试并发效率 func BenchmarkLoopsParallel(b *testin
阅读全文
Golang性能测试工具PProf应用详解
摘要:Google 开发的 Golang 自 2009 年推出,已经日趋成为各大公司开发后端服务使用的语言,有名的基于 Golang 的开源项目有Docker、Kubernetes等。当使用 Golang 开发服务后端时,难免产生性能问题,如内存泄漏、Goroutine 卡死等,Golang 是一个对性能
阅读全文