在开始一个新的小项目的玩耍的时候,发现有了这样一个不错的工具可以进行AB测试。
A/B测试是一种新兴的网页优化方法,可以用于增加转化率注册率等网页指标。AB测试本质上是个分离式组间实验,以前进行AB测试的技术成本和资源成本相对较高,但现在一系列专业的可视化实验工具的出现,AB测试已越来越成为网站优化常用的方法。
如果我们的go已经可以执行的话
go get github.com/rakyll/boom
然而,我没有设置GOPATH
,于是提示了:
package github.com/rakyll/boom: cannot download, $GOPATH not set. For more details see: go help gopath
The Go path is used to resolve import statements.
It is implemented by and documented in the go/build package.
The GOPATH environment variable lists places to look for Go code.
On Unix, the value is a colon-separated string.
On Windows, the value is a semicolon-separated string.
On Plan 9, the value is a list.
GOPATH must be set to get, build and install packages outside the
standard Go tree.
接着
export GOPATH="$HOME/gocode/"
简单的示范如官方的代码所示:
boom -n 1000 -c 100 http://0.0.0.0:8000/posts/1
用的是falcon
+ peewee
+ gunicorn
搭建的简单server
1000 / 1000 Boooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo! 100.00 %
Summary:
Total: 1.9052 secs.
Slowest: 0.2054 secs.
Fastest: 0.0111 secs.
Average: 0.1817 secs.
Requests/sec: 524.8813
Total Data Received: 5459000 bytes.
Response Size per Request: 5459 bytes.
Status code distribution:
[200] 1000 responses
Response time histogram:
0.011 [1] |
0.031 [10] |
0.050 [10] |
0.069 [11] |
0.089 [11] |
0.108 [10] |
0.128 [11] |
0.147 [11] |
0.167 [11] |
0.186 [295] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
0.205 [619] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
Latency distribution:
10% in 0.1764 secs.
25% in 0.1841 secs.
50% in 0.1892 secs.
75% in 0.1942 secs.
90% in 0.2011 secs.
95% in 0.2024 secs.
99% in 0.2038 secs.
看上去似乎还不错,只是是本地的。
围观我的Github Idea墙, 也许,你会遇到心仪的项目