Ver código fonte

update readme

walkor 11 anos atrás
pai
commit
a7229c66fe

+ 1 - 1
applications/Benchmark/Benchmark.php

@@ -30,7 +30,7 @@ class Benchmark extends Man\Core\SocketWorker
             return $this->sendToClient("HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\nhello");
         }
         // 是benchmark脚本
-        return $buffer;
+        return $this->sendToClient($buffer);
     }
     
 } 

+ 3 - 1
applications/Benchmark/README.md

@@ -1,8 +1,10 @@
 Benchmark 
 =========
 
+将workerman/conf/conf.d/Benchmark.conf 中的 start_workers设置为cpu核数的8倍
+
 方法一:ab -n 100000 -c200 127.0.0.1:56789/  
 
 方法二:使用workerman自带的benchmark软件,只支持64位linux系统  
 1: ./benchmark -n10000 -h1 -c400 -p56789 127.0.0.1    // 命令含义是400并发线程,连接127.0.0.1:56789端口发送一个hello\n扥带服务端返回一个hello\n后断开连接,这样运行10000次  
-2:./benchmark -n1 -h10000 -c1000 -p56789 127.0.0.1    // 命令含义是1000并发线程,连接127.0.0.1:56789端口连续发送10000个hello\n  
+2:./benchmark -n1 -h10000 -c1000 -p56789 127.0.0.1    // 命令含义是1000并发线程,连接127.0.0.1:56789端口连续发送10000个hello\n