内容简介:主要介绍了一下命令工具,最后用profile做了个webserver的优化先profile,再调优。收集到详细可信的数据,问题即使不能解决,至少清楚在哪里了。
大胡子小哥教go
go tooling in action
主要介绍了一下命令工具,最后用profile做了个webserver的优化
- Command
go list -f '{{ join .Imports "\n"}}'
go list -f '{{ join .Imports "\n"}}' log
go doc fmt
go doc fmt printf
godoc -http :6060
go tool vet
-
debug daemon
-
test
table driven test
直接发请求测试
-
用火焰图调优
go-wrk go tool pprof go-torch go test bench
- 正则表达式build一次
- 不用正则表达式
- set http header type
感想
先profile,再调优。收集到详细可信的数据,问题即使不能解决,至少清楚在哪里了。
另
关于daemon到讨论很有意思
https://github.com/golang/go/issues/227以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Distributed Algorithms: An Intuitive Approach
Wan Fokkink / MIT Press / 2018-2-2 / USD 48.00
The new edition of a guide to distributed algorithms that emphasizes examples and exercises rather than the intricacies of mathematical models. This book offers students and researchers a guide to ......一起来看看 《Distributed Algorithms: An Intuitive Approach》 这本书的介绍吧!