Skip to content

Commit

Permalink
hydra-client test documents
Browse files Browse the repository at this point in the history
  • Loading branch information
kuixiang committed May 14, 2013
1 parent 900ff4a commit 18985f7
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 30 deletions.
Binary file added docs/test/Hydra-client功能测试清单.xls
Binary file not shown.
Binary file added docs/test/Hydra-client测试报告-1.0.doc
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public boolean registerService(String name, List<String> services) {
try {
this.registerInfo = leaderService.registerClient(name, services);
} catch (Exception e) {
logger.warn("client global config-info cannot regist into the hydra system");
logger.warn("[Hydra] Client global config-info cannot regist into the hydra system");
}
if (registerInfo != null) {
logger.info("Global registry option is ok!");
logger.info("[Hydra] Global registry option is ok!");
isRegister = true;
}
return isRegister;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class HydraFilter implements Filter {
private Tracer tracer = null;

public HydraFilter(){
System.out.println("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
}

// 调用过程拦截
Expand All @@ -64,7 +63,7 @@ public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcExcept
}
long start = System.currentTimeMillis();
RpcContext context = RpcContext.getContext();
System.out.println((context.isConsumerSide()?"C":"S") + "----"+this.serviceId + "---" + context.getMethodName() + "---" + RpcContext.getContext().getUrl().getServiceInterface());
// System.out.println((context.isConsumerSide()?"C":"S") + "----"+this.serviceId + "---" + context.getMethodName() + "---" + RpcContext.getContext().getUrl().getServiceInterface());
boolean isConsumerSide = context.isConsumerSide();
Span span = null;
Endpoint endpoint = null;
Expand Down
34 changes: 17 additions & 17 deletions modules/hydra-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ Hydra 测试
hydra-test-benchmark 提供基准测试框架,集成测试中完成具体性能测试

##接入Hydra前
----------Benchmark Statistics--------------
Concurrents: 10
ClientNums: 1
Runtime: 50 seconds
Benchmark Time: 11
Requests: 48872 Success: 100% (48872) Error: 0% (0)
Avg TPS: 2398 Max TPS: 2639 Min TPS: 2182
Avg RT: 4.166ms
RT <= 0: 0% 417/48872
RT (0,1]: 13% 6419/48872
RT (1,5]: 76% 37171/48872
RT (5,10]: 4% 2204/48872
RT (10,50]: 5% 2644/48872
RT (50,100]: 0% 17/48872
RT (100,500]: 0% 0/48872
RT (500,1000]: 0% 0/48872
RT > 1000: 0% 0/48872
----------Benchmark Statistics--------------
Concurrents: 10
ClientNums: 1
Runtime: 50 seconds
Benchmark Time: 11
Requests: 48872 Success: 100% (48872) Error: 0% (0)
Avg TPS: 2398 Max TPS: 2639 Min TPS: 2182
Avg RT: 4.166ms
RT <= 0: 0% 417/48872
RT (0,1]: 13% 6419/48872
RT (1,5]: 76% 37171/48872
RT (5,10]: 4% 2204/48872
RT (10,50]: 5% 2644/48872
RT (50,100]: 0% 17/48872
RT (100,500]: 0% 0/48872
RT (500,1000]: 0% 0/48872
RT > 1000: 0% 0/48872

##接入Hydra后
----------Benchmark Statistics--------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

########## ###########
classname=com.jd.bdp.hydra.benchmark.demo.DemoRunnable
serverip=192.168.227.83
serverport=20990
concurrents=10
concurrents=20
connectionnums=1
#超时
timeout=3000
#测试轮数
runtime=50
timeout=1000
runtime=600
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd /D %~dp0/../
SETLOCAL enabledelayedexpansion
for %%f in (%cd%\conf\*.*) do (
set CLASSPATH=!CLASSPATH!;%%f
)
echo %CLASSPATH%
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cd /D %~dp0
CALL env.bat
CALL env-bench.bat
echo "BenchmarkClient is starting..."
java -Xms512m -Xmx512m -Xmn128m -XX:+PrintGCDetails -Xloggc:log/Benchmark-gc.log -Dwrite.statistics=true -Ddubbo.properties.file="conf/dubbo.properties" -Djava.ext.dirs="conf;lib" "com.jd.bdp.hydra.benchmark.startBenchTest.StartBenchmark" > "log/Benchmark.log"
java -Xms512m -Xmx512m -Xmn128m -XX:+PrintGCDetails -Xloggc:log/Benchmark-gc.log -Dwrite.statistics=true -Ddubbo.properties.file="conf/dubbo.properties" -Dbenchmark.properties.file=conf/benchmark.properties -Djava.ext.dirs="conf;lib" "com.jd.bdp.hydra.benchmark.startBenchTest.StartBenchmark" > "log/Benchmark.log"
cd ..
echo "BenchmarkClient start scheckule is ok,you can check the log file in /log"
PAUSE

0 comments on commit 18985f7

Please sign in to comment.