一個簡單的高性能的HTTP服務器:httpstub
一個基于epoll簡單的高性能的HTTP服務器。
- can only serv one file
- can simulate response delay
- based on epoll </ul>
-
httpstub -f README.md -q
with "-q", no debug messages written to "stub.log"
-
ab -n10000 -c1000 http://localhost:8402/: 15000 r/s
-
ab -n10000 -c1000 -k http://localhost:8402/: 52000 r/s
-
Test Env:
$grep MemTotal /proc/meminfo MemTotal: 8174464 kB $grep 'model name' /proc/cpuinfo model name : Intel(R) Xeon(R) CPU E7- 2870 @ 2.40GHz model name : Intel(R) Xeon(R) CPU E7- 2870 @ 2.40GHz model name : Intel(R) Xeon(R) CPU E7- 2870 @ 2.40GHz model name : Intel(R) Xeon(R) CPU E7- 2870 @ 2.40GHz $uname -a Linux ts-rh64-6 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
usage: httpstub -p <port> -f <data file> -d <delay (ms)> [-q quiet]
性能
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!