File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -785,6 +785,38 @@ node-inspector是通过websocket方式来转向debug输入输出的。因此,
785
785
786
786
- nginx
787
787
- haproxy
788
+ ## 压力测试
789
+ ### ab
790
+
791
+ ab是apache自带的一个很好用的压力测试工具,当安装完apache的时候,就可以在bin下面找到ab
792
+
793
+ ab -n1000 -c100 http://127.0.0.1:4100
794
+
795
+ ### wrk
796
+
797
+ 安装
798
+
799
+ ```
800
+ git clone https://github.com/wg/wrk
801
+ cd wrk
802
+ make
803
+ sudo cp -rf wrk /bin/
804
+ ```
805
+
806
+ 测试
807
+
808
+ ```
809
+ wrk -t8 -c400 http://127.0.0.1:4100
810
+ Running 10s test @ http://127.0.0.1:4100
811
+ 8 threads and 400 connections
812
+ Thread Stats Avg Stdev Max +/- Stdev
813
+ Latency 99.83ms 16.70ms 175.72ms 76.86%
814
+ Req/Sec 325.50 161.75 665.00 50.27%
815
+ 22709 requests in 10.01s, 5.65MB read
816
+ Socket errors: connect 155, read 3461, write 0, timeout 775
817
+ Requests/sec: 2267.99
818
+ Transfer/sec: 578.07KB
819
+ ```
788
820
789
821
## 阅读文档
790
822
You can’t perform that action at this time.
0 commit comments