Luc*_*ord 5 performance ruby-on-rails request performance-testing newrelic
我创建了一个新的应用程序,我计划添加缓存,cdn和其他性能改进方法.我想检查当前的性能,并且在每种方法之后我想再次检查性能.这是一个Rails应用程序.
我该怎么办呢?有没有我可以用来检查这个的命令?我需要进行测试吗?怎么样?从我所看到的情况来看,似乎新的遗物提供了大量的信息,但在我看来,这仅仅是关于实时数据,我想测试应用程序可以处理的最大值(例如之前和之后)执行上述更改)以及监控实时数据.
一个简单的方法是使用apache bench:
ab -n 2000 -c 200 http://yourdomain.com/
Run Code Online (Sandbox Code Playgroud)
其中n是要发出的请求数,c是要使用的客户端数.
你会得到一份报告
Document Path: /
Document Length: 36153 bytes
Concurrency Level: 200
Time taken for tests: 4.544 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 72732000 bytes
HTML transferred: 72306000 bytes
Requests per second: 440.17 [#/sec] (mean)
Time per request: 454.366 [ms] (mean)
Time per request: 2.272 [ms] (mean, across all concurrent requests)
Transfer rate: 15632.19 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 72 77 59.1 73 1075
Processing: 160 357 96.3 325 636
Waiting: 73 196 95.9 165 488
Total: 234 434 109.9 398 1340
Percentage of the requests served within a certain time (ms)
50% 398
66% 419
75% 440
80% 468
90% 607
95% 671
98% 688
99% 700
100% 1340 (longest request)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3518 次 |
| 最近记录: |