php-stress-tester
DescriptionA simple stress tester based on swoole coroutine. Requirements- Swoole2.1.0+ (编译时请添加参数 --enable-openssl --enable-coroutine)
- PHP7.1+
- 勿同时安装opencensus扩展,经测试有内存泄漏问题
Usage# GETphp start.php -c 100 -n 1000 -host www.baidu.com -uri / -port 443 -ssl 1 -step 1# POSTphp start.php -c 100 -n 1000 -host www.baidu.com -uri / -port 443 -ssl 1 -step 1 -http_method POST -http_body {\"foo\":\"bar\"}# PUTphp start.php -c 100 -n 1000 -host www.baidu.com -uri / -port 443 -ssl 1 -step 1 -http_method PUT -http_body {\"foo\":\"bar\"}# DELETEphp start.php -c 100 -n 1000 -host www.baidu.com -uri / -port 443 -ssl 1 -step 1 -http_method DELETE -http_body {\"foo\":\"bar\"}# Helpphp start.php -help# Draw QPS graphpython tools/draw.py ~/php-stress-tester/reports/report_20180601144315278353823169.csv qps 1 Output测试中...最大请求并发: 100请求并发: 100请求总数: 1000平均耗时: 41.335484266281毫秒最大耗时: 165.99607467651毫秒最小耗时: 25.51007270813毫秒成功请求总数: 1000成功率: 100%成功平均耗时: 41.335484266281毫秒成功最大耗时: 165.99607467651毫秒成功最小耗时: 25.51007270813毫秒失败请求总数: 0失败率: 0%失败平均耗时: 0毫秒失败最大耗时: 0毫秒失败最小耗时: 0毫秒实时QPS: 1000平均QPS: 1000内存占用: 2012.72KB QPS GraphArguments- -c Concurrency
- -n Requests
- -host Hostname
- -uri Uri
- -port Port
- -ssl SSL
- -step Concurrency Step
- -http_method HTTP Method
- -http_body HTTP Body
- -memory_limit Memory Limit
- -max_coroutine Max Coroutine
|
请发表评论