├── .classpath
├── .fatjar
├── .project
├── .settings
├── org.eclipse.jdt.core.prefs
└── org.eclipse.jdt.launching.prefs
├── README
├── README.md
├── bin
└── httpclient
│ ├── AsyncHttpServer$1.class
│ ├── AsyncHttpServer.class
│ ├── AsyncHttpServerHandler.class
│ ├── FileLib.class
│ ├── HelpLib.class
│ ├── HttpBenchmark.class
│ ├── HttpBenchmarkClient$1.class
│ ├── HttpBenchmarkClient.class
│ ├── HttpBenchmarkClientHandler.class
│ ├── HttpClient$1.class
│ ├── HttpClient.class
│ ├── HttpClientHandler.class
│ ├── LogLib.class
│ ├── MailSendLib.class
│ ├── QPSStatTimer.class
│ ├── SendThread.class
│ ├── SimpleHttpServer.class
│ ├── StatChartLib.class
│ ├── TestReportLib.class
│ ├── asynchttpserver$1.class
│ ├── asynchttpserver.class
│ ├── asynchttpserverhandler.class
│ ├── filelib.class
│ ├── helplib.class
│ ├── httpbenchmark.class
│ ├── httpbenchmarkclient$1.class
│ ├── httpbenchmarkclient.class
│ ├── httpbenchmarkhandler.class
│ ├── httpclient$1.class
│ ├── httpclient.class
│ ├── httpclienthandler.class
│ ├── loglib.class
│ ├── mailsend.class
│ ├── qpsstattimer.class
│ ├── sendthread.class
│ ├── simplehttpserver.class
│ ├── statchart.class
│ ├── testdataread.class
│ ├── testreport.class
│ └── timmer.class
├── case
└── items.test.case
├── com
├── __init__.py
├── __init__.pyc
├── cmdLib.py
├── cmdLib.pyc
├── fileLib.py
├── fileLib.pyc
├── logLib.py
├── logLib.pyc
├── msgSend.py
├── parsetestcaseLib.py
├── parsetestcaseLib.pyc
└── sftpLib.py
├── conf
├── easysocketbenchmark.conf
├── httpbenchmark.conf
├── log4j2-srv.xml
└── log4j2.xml
├── data
├── benchmark_example.data
├── client_example.data
├── http_benchmark_get.data
├── http_benchmark_post.data
├── http_function_get.data
├── http_function_post.data
└── tmp.data
├── dep
└── libgcc_s.so.1
├── http.tar.gz
├── httpbenchmark.jar
├── httpclient.jar
├── httpunittest.py
├── lib
├── apache-log4j-2.1-bin.zip
├── javamail1_4_7.zip
├── jfreechart-1.0.19.zip
├── json-lib-2.4-jdk15.zip
├── netty-4.0.23.Final.tar.bz2
└── netty-4.1.0.Beta3.tar.bz2
├── libgcc_s.so.1
├── log
├── httpunittest.log
├── netty-http.log
└── simplehttpserver.log
├── scrshot
└── mail.png
├── simplehttpserver.jar
└── src
└── httpclient
├── AsyncHttpServer.java
├── AsyncHttpServerHandler.java
├── FileLib.java
├── HelpLib.java
├── HttpBenchmark.java
├── HttpBenchmarkClient.java
├── HttpBenchmarkClientHandler.java
├── HttpClient.java
├── HttpClientHandler.java
├── LogLib.java
├── MailSendLib.java
├── QPSStatTimer.java
├── SendThread.java
├── SimpleHttpServer.java
├── StatChartLib.java
└── TestReportLib.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.fatjar:
--------------------------------------------------------------------------------
1 | #Fat Jar Configuration File
2 | #Mon Oct 27 21:11:03 CST 2014
3 | onejar.license.required=false
4 | manifest.classpath=
5 | manifest.removesigners=true
6 | onejar.checkbox=true
7 | jarname=D\:\\WorkSpace\\netty\\httpbenchmark.jar
8 | manifest.mergeall=true
9 | manifest.mainclass=httpclient.httpbenchmark
10 | manifest.file=
11 | jarname.isextern=true
12 | onejar.expand=
13 | excludes=
14 | includes=
15 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | netty
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.builder.cleanOutputFolder=clean
3 | org.eclipse.jdt.core.builder.duplicateResourceTask=warning
4 | org.eclipse.jdt.core.builder.invalidClasspath=ignore
5 | org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
6 | org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
7 | org.eclipse.jdt.core.circularClasspath=error
8 | org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
9 | org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
10 | org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
11 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
12 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
13 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
14 | org.eclipse.jdt.core.compiler.compliance=1.6
15 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
16 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
17 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
18 | org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
19 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
20 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
21 | org.eclipse.jdt.core.compiler.source=1.6
22 | org.eclipse.jdt.core.incompatibleJDKLevel=ignore
23 | org.eclipse.jdt.core.incompleteClasspath=error
24 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.launching.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
3 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Requirements
2 | -----------------
3 | JAVA >= 1.6
4 |
5 | Usage
6 | -----------------
7 | Function Test : Just type "java -jar httpclient.jar -h" for help.
8 | Benchmark Test : Just type "java -jar httpbenchmark.jar -h" for help.
9 |
10 | Reminder
11 | -----------------
12 | This README is just a fast "quick start" document. You can find more detailed
13 | documentation at https://github.com/junneyang/http-benchmark-netty.
14 |
15 | Enjoy!
16 |
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | http-benchmark-netty
2 | =============
3 |
4 | 基于java netty的http客户端工具&http高性能测试工具,web性能测试首选。解决业界web测试工具压力不足、压力不均匀、统计输出不完备、扩展不灵活等所有缺陷。 测试工具参数配置灵活,可满足一般性能测试、延迟测试、最大连接数测试、吞吐量测试、压力测试、长时间稳定性测试、内存泄漏测试等场景。测试工具基于频繁的业务测试不断优化改进,稳定可靠、实用性强。
5 |
6 | ### 简介:
7 | * 基于netty异步库开发,one epoll per thread模型,性能强悍。
8 | * 支持随机请求、支持配置线程数、客户端个数、支持压力山大发送模式。
9 | * 支持返回结果验证。
10 | * 支持qps、延迟、最大连接数等统计。
11 | * 支持测试报告邮件自动发送。
12 |
13 | ### 使用:
14 | * 详见README。
15 | * 测试报告截图:
16 | 
17 |
--------------------------------------------------------------------------------
/bin/httpclient/AsyncHttpServer$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/AsyncHttpServer$1.class
--------------------------------------------------------------------------------
/bin/httpclient/AsyncHttpServer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/AsyncHttpServer.class
--------------------------------------------------------------------------------
/bin/httpclient/AsyncHttpServerHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/AsyncHttpServerHandler.class
--------------------------------------------------------------------------------
/bin/httpclient/FileLib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/FileLib.class
--------------------------------------------------------------------------------
/bin/httpclient/HelpLib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HelpLib.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpBenchmark.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpBenchmark.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpBenchmarkClient$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpBenchmarkClient$1.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpBenchmarkClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpBenchmarkClient.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpBenchmarkClientHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpBenchmarkClientHandler.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpClient$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpClient$1.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpClient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpClient.class
--------------------------------------------------------------------------------
/bin/httpclient/HttpClientHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/HttpClientHandler.class
--------------------------------------------------------------------------------
/bin/httpclient/LogLib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/LogLib.class
--------------------------------------------------------------------------------
/bin/httpclient/MailSendLib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/MailSendLib.class
--------------------------------------------------------------------------------
/bin/httpclient/QPSStatTimer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/QPSStatTimer.class
--------------------------------------------------------------------------------
/bin/httpclient/SendThread.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/SendThread.class
--------------------------------------------------------------------------------
/bin/httpclient/SimpleHttpServer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/SimpleHttpServer.class
--------------------------------------------------------------------------------
/bin/httpclient/StatChartLib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/StatChartLib.class
--------------------------------------------------------------------------------
/bin/httpclient/TestReportLib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/TestReportLib.class
--------------------------------------------------------------------------------
/bin/httpclient/asynchttpserver$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/asynchttpserver$1.class
--------------------------------------------------------------------------------
/bin/httpclient/asynchttpserver.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/asynchttpserver.class
--------------------------------------------------------------------------------
/bin/httpclient/asynchttpserverhandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/asynchttpserverhandler.class
--------------------------------------------------------------------------------
/bin/httpclient/filelib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/filelib.class
--------------------------------------------------------------------------------
/bin/httpclient/helplib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/helplib.class
--------------------------------------------------------------------------------
/bin/httpclient/httpbenchmark.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpbenchmark.class
--------------------------------------------------------------------------------
/bin/httpclient/httpbenchmarkclient$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpbenchmarkclient$1.class
--------------------------------------------------------------------------------
/bin/httpclient/httpbenchmarkclient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpbenchmarkclient.class
--------------------------------------------------------------------------------
/bin/httpclient/httpbenchmarkhandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpbenchmarkhandler.class
--------------------------------------------------------------------------------
/bin/httpclient/httpclient$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpclient$1.class
--------------------------------------------------------------------------------
/bin/httpclient/httpclient.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpclient.class
--------------------------------------------------------------------------------
/bin/httpclient/httpclienthandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/httpclienthandler.class
--------------------------------------------------------------------------------
/bin/httpclient/loglib.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/loglib.class
--------------------------------------------------------------------------------
/bin/httpclient/mailsend.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/mailsend.class
--------------------------------------------------------------------------------
/bin/httpclient/qpsstattimer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/qpsstattimer.class
--------------------------------------------------------------------------------
/bin/httpclient/sendthread.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/sendthread.class
--------------------------------------------------------------------------------
/bin/httpclient/simplehttpserver.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/simplehttpserver.class
--------------------------------------------------------------------------------
/bin/httpclient/statchart.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/statchart.class
--------------------------------------------------------------------------------
/bin/httpclient/testdataread.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/testdataread.class
--------------------------------------------------------------------------------
/bin/httpclient/testreport.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/testreport.class
--------------------------------------------------------------------------------
/bin/httpclient/timmer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/bin/httpclient/timmer.class
--------------------------------------------------------------------------------
/case/items.test.case:
--------------------------------------------------------------------------------
1 | {
2 | "case_1000001": {
3 | "info": {
4 | "name": "用例标题:case_1000001",
5 | "is_valid": true,
6 | "types": []
7 | },
8 | "input": {
9 | "method" : "POST",
10 | "url" : "/lbs/da/openservice",
11 | "data" : {
12 | "service": "UserService",
13 | "method": "GetNuomiUserPreference",
14 | "request": {
15 | "header": {
16 | "subservice":"sub",
17 | "secretkey": "pass",
18 | "servicekey": "key1"
19 | },
20 | "id_type":2,
21 | "id":"3uiuiueiukjfdkj:FG=3",
22 | "data_type":100
23 | }
24 | }
25 | },
26 | "expect": {"response":{"features":[{"feature_name":"cat6","score_info":{"featureid":"326","score":2.340000},"data_type":1},{"feature_name":"cat6","score_info":{"featureid":"330","score":4.270000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"330","score":4.250000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"326","score":2.340000},"data_type":1}],"result_type":100,"other_infos":[],"item_infos":[{"id":"1241844","score":5.000000,"info":"bn_buy_pc","date":"20140819"}]},"service":"UserService","method":"GetNuomiUserPreference"}
27 | },
28 | "case_1000002": {
29 | "info": {
30 | "name": "用例标题:case_1000002",
31 | "is_valid": true,
32 | "types": []
33 | },
34 | "input": {
35 | "method" : "POST",
36 | "url" : "/lbs/da/openservice",
37 | "data" : {
38 | "service": "UserService",
39 | "method": "GetNuomiUserPreference",
40 | "request": {
41 | "header": {
42 | "subservice":"sub",
43 | "secretkey": "pass",
44 | "servicekey": "key1"
45 | },
46 | "id_type":2,
47 | "id":"3uiuiueiukjfdkj:FG=3",
48 | "data_type":100
49 | }
50 | }
51 | },
52 | "expect": {"response":{"features":[{"feature_name":"cat6","score_info":{"featureid":"326","score":2.340000},"data_type":1},{"feature_name":"cat6","score_info":{"featureid":"330","score":4.270000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"330","score":4.250000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"326","score":2.340000},"data_type":1}],"result_type":100,"other_infos":[],"item_infos":[{"id":"1241844","score":5.000000,"info":"bn_buy_pc","date":"20140819"}]},"service":"UserService","method":"GetNuomiUserPreference"}
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/com/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/com/__init__.py
--------------------------------------------------------------------------------
/com/__init__.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/com/__init__.pyc
--------------------------------------------------------------------------------
/com/cmdLib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #-*- coding: utf-8 -*-
3 | import sys
4 | import os
5 | sys.path.append("%s/../"%os.path.dirname(os.path.realpath(__file__)))
6 |
7 | from logLib import *
8 | import subprocess
9 | import commands
10 |
11 | def cmd_execute(cmd,mode="commands"):
12 | #logging.debug("cmdStr:"+cmd)
13 | if(mode == "subprocess"):
14 | ps=subprocess.Popen(cmd,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
15 | ps.wait()
16 | stdout,stderror=ps.communicate()
17 | return stdout,stderror
18 | if(mode == "commands"):
19 | status,output=commands.getstatusoutput(cmd)
20 | return status,output
21 |
22 | if __name__ == "__main__":
23 | status,output=cmd_execute("ps -ef | grep redis-server | grep -v grep | wc -l")
24 | print status
25 | print output
26 |
27 |
--------------------------------------------------------------------------------
/com/cmdLib.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/com/cmdLib.pyc
--------------------------------------------------------------------------------
/com/fileLib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #-*- coding: utf-8 -*-
3 | import linecache
4 |
5 | def get_file_lines(filepath):
6 | try:
7 | lines=linecache.getlines(filepath)
8 | return lines
9 | except Exception as e:
10 | print(e)
11 | finally:
12 | linecache.clearcache()
13 | def get_file_str(filepath):
14 | filestr=""
15 | lines=get_file_lines(filepath)
16 | for line in lines:
17 | filestr += line
18 | return filestr
19 |
20 | if __name__ == "__main__":
21 | pass
22 |
--------------------------------------------------------------------------------
/com/fileLib.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/com/fileLib.pyc
--------------------------------------------------------------------------------
/com/logLib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 | import sys
4 | import os
5 | sys.path.append("%s/../"%os.path.dirname(os.path.realpath(__file__)))
6 | import logging
7 |
8 | LogFilePath="./log/httpunittest.log"
9 | logging.basicConfig(level=logging.DEBUG,
10 | format='[%(levelname)s] [%(asctime)s] [%(filename)s-line:%(lineno)d] [%(funcName)s-%(threadName)s] %(message)s',
11 | datefmt='%a,%Y-%m-%d %H:%M:%S',
12 | filename=LogFilePath,
13 | filemode='a')
14 |
15 |
16 | if __name__ == "__main__":
17 | logging.debug("HelloWorld")
18 |
--------------------------------------------------------------------------------
/com/logLib.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/com/logLib.pyc
--------------------------------------------------------------------------------
/com/msgSend.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #-*- coding: utf-8 -*-
3 |
4 | from subprocess import call
5 | from logLib import *
6 | def msgSend(phonenum_list,msg_content):
7 | for phonenum in phonenum_list:
8 | cmd = "gsmsend -s emp01.baidu.com:15003 "+phonenum+"@"+"\""+msg_content+"\""
9 | print cmd
10 | Ret=call(cmd, shell=True)
11 | if(Ret != 0):
12 | logging.error("msgSend failed!")
13 |
14 | if __name__ == '__main__':
15 | msgSend(['18665817689','15220056030'],u'TASK FINISHED:tuangou_brand badcase mining.')
16 |
--------------------------------------------------------------------------------
/com/parsetestcaseLib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #-*- coding: utf-8 -*-
3 | import json
4 | import sys
5 |
6 | def get_testcase(filepath):
7 | testcase=json.load(open(filepath, "r"),encoding='utf-8')
8 | return testcase
9 |
10 | if __name__ == "__main__":
11 | pass
12 |
13 |
--------------------------------------------------------------------------------
/com/parsetestcaseLib.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/com/parsetestcaseLib.pyc
--------------------------------------------------------------------------------
/com/sftpLib.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # -*- coding: utf-8 -*-
3 |
4 | import paramiko
5 |
6 | def get_file(remotefilepath,localfilepath):
7 | try:
8 | t=paramiko.Transport((hostname, port))
9 | t.connect(username=username, password=password)
10 | sftp=paramiko.SFTPClient.from_transport(t)
11 | sftp.get(remotefilepath,localfilepath)
12 | except:
13 | print('get file error')
14 | finally:
15 | t.close()
16 |
17 | if __name__ == "__main__":
18 | get_file('/home/map/importer/TgBrand0_import/status.txt','status.txt')
19 | import fileLib
20 | status=fileLib.get_file_lines('status.txt')
21 | print status
22 | print status[0]
23 | print status[0].strip()
24 |
--------------------------------------------------------------------------------
/conf/easysocketbenchmark.conf:
--------------------------------------------------------------------------------
1 | #邮件服务器地址
2 | mailserver = XXX
3 | #邮件发送者,邮件接受列表通过命令行实时传递
4 | sender = XXX
5 |
--------------------------------------------------------------------------------
/conf/httpbenchmark.conf:
--------------------------------------------------------------------------------
1 | #邮件服务器地址
2 | mailserver = XXX
3 | #邮件发送者,邮件接受列表通过命令行实时传递
4 | sender = XXX
5 |
--------------------------------------------------------------------------------
/conf/log4j2-srv.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/conf/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/data/benchmark_example.data:
--------------------------------------------------------------------------------
1 | {
2 | "method" : "POST",
3 | "data" : [
4 | {
5 | "url": "/lbs/da/openservice",
6 | "body":{
7 | "service": "ItemService",
8 | "method": "GetItemsByItem",
9 | "request": {
10 | "header": {
11 | "subservice":"sub",
12 | "secretkey": "pass",
13 | "servicekey": "key1"
14 | },
15 | "algorithmId": "topic_rev_poi",
16 | "item_ids": ["9977193541978760286"]
17 | }
18 | },
19 | "expect": {"response":{"items":[{"id":"18012202574307917823","value":[0.300000,0.500000,0.400000],"str_value":[]},{"id":"12313225205891489106","value":[1.000000],"str_value":[]},{"id":"18119621412888245380","value":[0.700000],"str_value":[]},{"id":"2071168565446484381","value":[0.300000],"str_value":[]},{"id":"11710154692952313709","value":[0.300000],"str_value":[]}],"args":[]},"service":"ItemService","method":"GetItemsByItem"}
20 | },
21 | {
22 | "url": "/lbs/da/openservice",
23 | "body":{
24 | "service": "ItemService",
25 | "method": "GetItemsByItem",
26 | "request": {
27 | "header": {
28 | "subservice":"sub",
29 | "secretkey": "pass",
30 | "servicekey": "key1"
31 | },
32 | "algorithmId": "topic_rev_poi",
33 | "item_ids": ["9977193541978760286"]
34 | }
35 | },
36 | "expect": {"response":{"items":[{"id":"18012202574307917823","value":[0.300000,0.500000,0.400000],"str_value":[]},{"id":"12313225205891489106","value":[1.000000],"str_value":[]},{"id":"18119621412888245380","value":[0.700000],"str_value":[]},{"id":"2071168565446484381","value":[0.300000],"str_value":[]},{"id":"11710154692952313709","value":[0.300000],"str_value":[]}],"args":[]},"service":"ItemService","method":"GetItemsByItem"}
37 | }
38 | ]
39 | }
40 |
--------------------------------------------------------------------------------
/data/client_example.data:
--------------------------------------------------------------------------------
1 | {
2 | "method" : "POST",
3 | "url" : "/lbs/da/openservice",
4 | "data" : {
5 | "service": "ItemService",
6 | "method": "GetItemsByItem",
7 | "request": {
8 | "header": {
9 | "subservice":"sub",
10 | "secretkey": "pass",
11 | "servicekey": "key1"
12 | },
13 | "algorithmId": "topic_rev_poi",
14 | "item_ids": ["9977193541978760286"]
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/data/http_benchmark_get.data:
--------------------------------------------------------------------------------
1 | {
2 | "method" : "GET",
3 | "data" : [
4 | {
5 | "url": "/lbs/da/openservice",
6 | "expect": {"response":{"features":[{"feature_name":"cat6","score_info":{"featureid":"326","score":2.340000},"data_type":1},{"feature_name":"cat6","score_info":{"featureid":"330","score":4.270000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"330","score":4.250000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"326","score":2.340000},"data_type":1}],"result_type":100,"other_infos":[],"item_infos":[{"id":"1241844","score":5.000000,"info":"bn_buy_pc","date":"20140819"}]},"service":"UserService","method":"GetNuomiUserPreference"}
7 | },
8 | {
9 | "url": "/lbs/da/openservice",
10 | "expect": {"response":{"features":[{"feature_name":"cat6","score_info":{"featureid":"326","score":2.340000},"data_type":1},{"feature_name":"cat6","score_info":{"featureid":"330","score":4.270000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"330","score":4.250000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"326","score":2.340000},"data_type":1}],"result_type":100,"other_infos":[],"item_infos":[{"id":"1241844","score":5.000000,"info":"bn_buy_pc","date":"20140819"}]},"service":"UserService","method":"GetNuomiUserPreference"}
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/data/http_benchmark_post.data:
--------------------------------------------------------------------------------
1 | {
2 | "method" : "POST",
3 | "data" : [
4 | {
5 | "url": "/lbs/da/openservice",
6 | "body":{
7 | "service": "UserService",
8 | "method": "GetNuomiUserPreference",
9 | "request": {
10 | "header": {
11 | "subservice":"sub",
12 | "secretkey": "pass",
13 | "servicekey": "key1"
14 | },
15 | "id_type":2,
16 | "id":"3uiuiueiukjfdkj:FG=3",
17 | "data_type":100
18 | }
19 | },
20 | "expect": {"response":{"features":[{"feature_name":"cat6","score_info":{"featureid":"326","score":2.340000},"data_type":1},{"feature_name":"cat6","score_info":{"featureid":"330","score":4.270000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"330","score":4.250000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"326","score":2.340000},"data_type":1}],"result_type":100,"other_infos":[],"item_infos":[{"id":"1241844","score":5.000000,"info":"bn_buy_pc","date":"20140819"}]},"service":"UserService","method":"GetNuomiUserPreference"}
21 | },
22 | {
23 | "url": "/lbs/da/openservice",
24 | "body":{
25 | "service": "UserService",
26 | "method": "GetNuomiUserPreference",
27 | "request": {
28 | "header": {
29 | "subservice":"sub",
30 | "secretkey": "pass",
31 | "servicekey": "key1"
32 | },
33 | "id_type":2,
34 | "id":"3uiuiueiukjfdkj:FG=3",
35 | "data_type":100
36 | }
37 | },
38 | "expect": {"response":{"features":[{"feature_name":"cat6","score_info":{"featureid":"326","score":2.340000},"data_type":1},{"feature_name":"cat6","score_info":{"featureid":"330","score":4.270000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"330","score":4.250000},"data_type":1},{"feature_name":"cat5","score_info":{"featureid":"326","score":2.340000},"data_type":1}],"result_type":100,"other_infos":[],"item_infos":[{"id":"1241844","score":5.000000,"info":"bn_buy_pc","date":"20140819"}]},"service":"UserService","method":"GetNuomiUserPreference"}
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/data/http_function_get.data:
--------------------------------------------------------------------------------
1 | {
2 | "method" : "GET",
3 | "url" : "/lbs/da/openservice"
4 | }
5 |
--------------------------------------------------------------------------------
/data/http_function_post.data:
--------------------------------------------------------------------------------
1 | {
2 | "method" : "POST",
3 | "url" : "/lbs/da/openservice",
4 | "data" : {
5 | "service": "UserService",
6 | "method": "GetNuomiUserPreference",
7 | "request": {
8 | "header": {
9 | "subservice":"sub",
10 | "secretkey": "pass",
11 | "servicekey": "key1"
12 | },
13 | "id_type":2,
14 | "id":"3uiuiueiukjfdkj:FG=3",
15 | "data_type":100
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/data/tmp.data:
--------------------------------------------------------------------------------
1 | {"url": "/lbs/da/openservice", "data": {"request": {"header": {"secretkey": "pass", "subservice": "sub", "servicekey": "key1"}, "id_type": 2, "data_type": 100, "id": "3uiuiueiukjfdkj:FG=3"}, "method": "GetNuomiUserPreference", "service": "UserService"}, "method": "POST"}
--------------------------------------------------------------------------------
/dep/libgcc_s.so.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/dep/libgcc_s.so.1
--------------------------------------------------------------------------------
/http.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/http.tar.gz
--------------------------------------------------------------------------------
/httpbenchmark.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/httpbenchmark.jar
--------------------------------------------------------------------------------
/httpclient.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/httpclient.jar
--------------------------------------------------------------------------------
/httpunittest.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #-*- coding: utf-8 -*-
3 | import sys
4 | import codecs
5 | import json
6 | import unittest
7 |
8 | from com.cmdLib import *
9 | from com.logLib import *
10 | from com.parsetestcaseLib import *
11 |
12 | filepath="./case/items.test.case"
13 | testcase=get_testcase(filepath)
14 | ip="127.0.0.1"
15 | port="18999"
16 | method="POST"
17 | url="/lbs/da/openservice"
18 |
19 | class httpunittest(unittest.TestCase):
20 | def service_proc(self,test_case_id):
21 | logging.debug("***********************************************************************************************")
22 | logging.debug("test_case_id : " + test_case_id)
23 | case_name=testcase[test_case_id]['info']['name']
24 | case_input=testcase[test_case_id]['input']
25 | case_expect=testcase[test_case_id]['expect']
26 |
27 | fp=codecs.open("./data/tmp.data","w","utf-8")
28 | fp.write(json.dumps(case_input))
29 | fp.close()
30 | cmdstr="java -jar httpclient.jar " + ip + " " + port + " " + "./data/tmp.data"
31 | logging.debug("cmdstr : " + cmdstr)
32 | status,output=cmd_execute(cmdstr)
33 | output=json.loads(output)
34 | logging.debug("expect : " + json.dumps(case_expect))
35 | logging.debug("output : " + json.dumps(output))
36 | assert(output == case_expect)
37 | logging.debug("***********************************************************************************************\n\n")
38 |
39 | for test_case_id in testcase:
40 | exec("def test_%s(self): self.service_proc('%s')" %(test_case_id,test_case_id))
41 |
42 | if __name__ == '__main__':
43 | TestSuit=unittest.TestLoader().loadTestsFromTestCase(httpunittest)
44 | unittest.TextTestRunner(verbosity=2).run(TestSuit)
45 |
46 |
47 |
--------------------------------------------------------------------------------
/lib/apache-log4j-2.1-bin.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/lib/apache-log4j-2.1-bin.zip
--------------------------------------------------------------------------------
/lib/javamail1_4_7.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/lib/javamail1_4_7.zip
--------------------------------------------------------------------------------
/lib/jfreechart-1.0.19.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/lib/jfreechart-1.0.19.zip
--------------------------------------------------------------------------------
/lib/json-lib-2.4-jdk15.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/lib/json-lib-2.4-jdk15.zip
--------------------------------------------------------------------------------
/lib/netty-4.0.23.Final.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/lib/netty-4.0.23.Final.tar.bz2
--------------------------------------------------------------------------------
/lib/netty-4.1.0.Beta3.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/lib/netty-4.1.0.Beta3.tar.bz2
--------------------------------------------------------------------------------
/libgcc_s.so.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/libgcc_s.so.1
--------------------------------------------------------------------------------
/log/httpunittest.log:
--------------------------------------------------------------------------------
1 | [DEBUG] [Thu,2014-10-23 23:51:58] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
2 | [DEBUG] [Thu,2014-10-23 23:51:58] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
3 | [DEBUG] [Thu,2014-10-23 23:51:58] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
4 | [DEBUG] [Thu,2014-10-23 23:52:01] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
5 | [DEBUG] [Thu,2014-10-23 23:52:01] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
6 | [DEBUG] [Thu,2014-10-23 23:52:01] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
7 |
8 |
9 | [DEBUG] [Thu,2014-10-23 23:52:01] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
10 | [DEBUG] [Thu,2014-10-23 23:52:01] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
11 | [DEBUG] [Thu,2014-10-23 23:52:01] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
12 | [DEBUG] [Thu,2014-10-23 23:52:05] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
13 | [DEBUG] [Thu,2014-10-23 23:52:05] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
14 | [DEBUG] [Thu,2014-10-23 23:52:05] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
15 |
16 |
17 | [DEBUG] [Fri,2014-10-24 00:13:56] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
18 | [DEBUG] [Fri,2014-10-24 00:13:56] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
19 | [DEBUG] [Fri,2014-10-24 00:13:56] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
20 | [DEBUG] [Fri,2014-10-24 00:14:00] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
21 | [DEBUG] [Fri,2014-10-24 00:14:00] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
22 | [DEBUG] [Fri,2014-10-24 00:14:00] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
23 |
24 |
25 | [DEBUG] [Fri,2014-10-24 00:14:00] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
26 | [DEBUG] [Fri,2014-10-24 00:14:00] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
27 | [DEBUG] [Fri,2014-10-24 00:14:00] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
28 | [DEBUG] [Fri,2014-10-24 00:14:04] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
29 | [DEBUG] [Fri,2014-10-24 00:14:04] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
30 | [DEBUG] [Fri,2014-10-24 00:14:04] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
31 |
32 |
33 | [DEBUG] [Fri,2014-10-24 00:15:10] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
34 | [DEBUG] [Fri,2014-10-24 00:15:10] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
35 | [DEBUG] [Fri,2014-10-24 00:15:10] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
36 | [DEBUG] [Fri,2014-10-24 00:15:14] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
37 | [DEBUG] [Fri,2014-10-24 00:15:14] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
38 | [DEBUG] [Fri,2014-10-24 00:15:14] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
39 |
40 |
41 | [DEBUG] [Fri,2014-10-24 00:15:14] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
42 | [DEBUG] [Fri,2014-10-24 00:15:14] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
43 | [DEBUG] [Fri,2014-10-24 00:15:14] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
44 | [DEBUG] [Fri,2014-10-24 00:15:18] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
45 | [DEBUG] [Fri,2014-10-24 00:15:18] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
46 | [DEBUG] [Fri,2014-10-24 00:15:18] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
47 |
48 |
49 | [DEBUG] [Fri,2014-10-24 00:17:21] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
50 | [DEBUG] [Fri,2014-10-24 00:17:21] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
51 | [DEBUG] [Fri,2014-10-24 00:17:21] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
52 | [DEBUG] [Fri,2014-10-24 00:17:25] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
53 | [DEBUG] [Fri,2014-10-24 00:17:25] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
54 | [DEBUG] [Fri,2014-10-24 00:17:25] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
55 |
56 |
57 | [DEBUG] [Fri,2014-10-24 00:17:25] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
58 | [DEBUG] [Fri,2014-10-24 00:17:25] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
59 | [DEBUG] [Fri,2014-10-24 00:17:25] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
60 | [DEBUG] [Fri,2014-10-24 00:17:29] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
61 | [DEBUG] [Fri,2014-10-24 00:17:29] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
62 | [DEBUG] [Fri,2014-10-24 00:17:29] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
63 |
64 |
65 | [DEBUG] [Fri,2014-10-24 00:19:23] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
66 | [DEBUG] [Fri,2014-10-24 00:19:23] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
67 | [DEBUG] [Fri,2014-10-24 00:19:23] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
68 | [DEBUG] [Fri,2014-10-24 00:22:31] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
69 | [DEBUG] [Fri,2014-10-24 00:22:31] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
70 | [DEBUG] [Fri,2014-10-24 00:22:31] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
71 | [DEBUG] [Fri,2014-10-24 00:22:34] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
72 | [DEBUG] [Fri,2014-10-24 00:22:34] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
73 | [DEBUG] [Fri,2014-10-24 00:22:34] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
74 |
75 |
76 | [DEBUG] [Fri,2014-10-24 00:22:34] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
77 | [DEBUG] [Fri,2014-10-24 00:22:34] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
78 | [DEBUG] [Fri,2014-10-24 00:22:34] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
79 | [DEBUG] [Fri,2014-10-24 00:22:38] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
80 | [DEBUG] [Fri,2014-10-24 00:22:38] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
81 | [DEBUG] [Fri,2014-10-24 00:22:38] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
82 |
83 |
84 | [DEBUG] [Fri,2014-10-24 10:23:37] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
85 | [DEBUG] [Fri,2014-10-24 10:23:37] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
86 | [DEBUG] [Fri,2014-10-24 10:23:37] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
87 | [DEBUG] [Fri,2014-10-24 10:23:41] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
88 | [DEBUG] [Fri,2014-10-24 10:23:41] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
89 | [DEBUG] [Fri,2014-10-24 10:23:41] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
90 |
91 |
92 | [DEBUG] [Fri,2014-10-24 10:23:41] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
93 | [DEBUG] [Fri,2014-10-24 10:23:41] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
94 | [DEBUG] [Fri,2014-10-24 10:23:41] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
95 | [DEBUG] [Fri,2014-10-24 10:23:45] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
96 | [DEBUG] [Fri,2014-10-24 10:23:45] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
97 | [DEBUG] [Fri,2014-10-24 10:23:45] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
98 |
99 |
100 | [DEBUG] [Fri,2014-10-24 10:24:56] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
101 | [DEBUG] [Fri,2014-10-24 10:24:56] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
102 | [DEBUG] [Fri,2014-10-24 10:24:56] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar ./com/httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
103 | [DEBUG] [Fri,2014-10-24 10:24:59] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
104 | [DEBUG] [Fri,2014-10-24 10:24:59] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
105 | [DEBUG] [Fri,2014-10-24 10:24:59] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
106 |
107 |
108 | [DEBUG] [Fri,2014-10-24 10:24:59] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
109 | [DEBUG] [Fri,2014-10-24 10:24:59] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
110 | [DEBUG] [Fri,2014-10-24 10:24:59] [httpunittest.py-line:34] [service_proc-MainThread] cmdstr : java -jar ./com/httpclient.jar 127.0.0.1 18999 POST /lbs/da/openservice ./data/tmp.data
111 | [DEBUG] [Fri,2014-10-24 10:25:03] [httpunittest.py-line:37] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
112 | [DEBUG] [Fri,2014-10-24 10:25:03] [httpunittest.py-line:38] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
113 | [DEBUG] [Fri,2014-10-24 10:25:03] [httpunittest.py-line:40] [service_proc-MainThread] ***********************************************************************************************
114 |
115 |
116 | [DEBUG] [Mon,2014-10-27 20:43:35] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
117 | [DEBUG] [Mon,2014-10-27 20:43:35] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
118 | [DEBUG] [Mon,2014-10-27 20:43:35] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
119 | [DEBUG] [Mon,2014-10-27 20:43:40] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
120 | [DEBUG] [Mon,2014-10-27 20:43:40] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
121 | [DEBUG] [Mon,2014-10-27 20:43:40] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
122 |
123 |
124 | [DEBUG] [Mon,2014-10-27 20:43:40] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
125 | [DEBUG] [Mon,2014-10-27 20:43:40] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
126 | [DEBUG] [Mon,2014-10-27 20:43:40] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
127 | [DEBUG] [Mon,2014-10-27 20:43:44] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
128 | [DEBUG] [Mon,2014-10-27 20:43:44] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
129 | [DEBUG] [Mon,2014-10-27 20:43:44] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
130 |
131 |
132 | [DEBUG] [Tue,2014-10-28 12:33:53] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
133 | [DEBUG] [Tue,2014-10-28 12:33:53] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
134 | [DEBUG] [Tue,2014-10-28 12:33:53] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
135 | [DEBUG] [Tue,2014-10-28 12:33:57] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
136 | [DEBUG] [Tue,2014-10-28 12:33:57] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
137 | [DEBUG] [Tue,2014-10-28 12:33:57] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
138 |
139 |
140 | [DEBUG] [Tue,2014-10-28 12:33:57] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
141 | [DEBUG] [Tue,2014-10-28 12:33:57] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
142 | [DEBUG] [Tue,2014-10-28 12:33:57] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
143 | [DEBUG] [Tue,2014-10-28 12:34:02] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
144 | [DEBUG] [Tue,2014-10-28 12:34:02] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
145 | [DEBUG] [Tue,2014-10-28 12:34:02] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
146 |
147 |
148 | [DEBUG] [Tue,2014-10-28 17:51:24] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
149 | [DEBUG] [Tue,2014-10-28 17:51:24] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
150 | [DEBUG] [Tue,2014-10-28 17:51:24] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
151 | [DEBUG] [Tue,2014-10-28 17:51:29] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
152 | [DEBUG] [Tue,2014-10-28 17:51:29] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
153 | [DEBUG] [Tue,2014-10-28 17:51:29] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
154 |
155 |
156 | [DEBUG] [Tue,2014-10-28 17:51:29] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
157 | [DEBUG] [Tue,2014-10-28 17:51:29] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
158 | [DEBUG] [Tue,2014-10-28 17:51:29] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
159 | [DEBUG] [Tue,2014-10-28 17:51:33] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
160 | [DEBUG] [Tue,2014-10-28 17:51:33] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
161 | [DEBUG] [Tue,2014-10-28 17:51:33] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
162 |
163 |
164 | [DEBUG] [Wed,2014-10-29 21:49:34] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
165 | [DEBUG] [Wed,2014-10-29 21:49:34] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
166 | [DEBUG] [Wed,2014-10-29 21:49:34] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
167 | [DEBUG] [Wed,2014-10-29 21:49:38] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
168 | [DEBUG] [Wed,2014-10-29 21:49:38] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
169 | [DEBUG] [Wed,2014-10-29 21:49:38] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
170 |
171 |
172 | [DEBUG] [Wed,2014-10-29 21:49:38] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
173 | [DEBUG] [Wed,2014-10-29 21:49:38] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
174 | [DEBUG] [Wed,2014-10-29 21:49:38] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
175 | [DEBUG] [Wed,2014-10-29 21:49:43] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
176 | [DEBUG] [Wed,2014-10-29 21:49:43] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
177 | [DEBUG] [Wed,2014-10-29 21:49:43] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
178 |
179 |
180 | [DEBUG] [Thu,2014-10-30 10:09:25] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
181 | [DEBUG] [Thu,2014-10-30 10:09:25] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000001
182 | [DEBUG] [Thu,2014-10-30 10:09:25] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
183 | [DEBUG] [Thu,2014-10-30 10:09:30] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
184 | [DEBUG] [Thu,2014-10-30 10:09:30] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
185 | [DEBUG] [Thu,2014-10-30 10:09:30] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
186 |
187 |
188 | [DEBUG] [Thu,2014-10-30 10:09:30] [httpunittest.py-line:21] [service_proc-MainThread] ***********************************************************************************************
189 | [DEBUG] [Thu,2014-10-30 10:09:30] [httpunittest.py-line:22] [service_proc-MainThread] test_case_id : case_1000002
190 | [DEBUG] [Thu,2014-10-30 10:09:30] [httpunittest.py-line:31] [service_proc-MainThread] cmdstr : java -jar httpclient.jar 127.0.0.1 18999 ./data/tmp.data
191 | [DEBUG] [Thu,2014-10-30 10:09:34] [httpunittest.py-line:34] [service_proc-MainThread] expect : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
192 | [DEBUG] [Thu,2014-10-30 10:09:34] [httpunittest.py-line:35] [service_proc-MainThread] output : {"response": {"item_infos": [{"info": "bn_buy_pc", "date": "20140819", "score": 5.0, "id": "1241844"}], "other_infos": [], "features": [{"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.27}, "feature_name": "cat6", "data_type": 1}, {"score_info": {"featureid": "330", "score": 4.25}, "feature_name": "cat5", "data_type": 1}, {"score_info": {"featureid": "326", "score": 2.34}, "feature_name": "cat5", "data_type": 1}], "result_type": 100}, "service": "UserService", "method": "GetNuomiUserPreference"}
193 | [DEBUG] [Thu,2014-10-30 10:09:34] [httpunittest.py-line:37] [service_proc-MainThread] ***********************************************************************************************
194 |
195 |
196 |
--------------------------------------------------------------------------------
/log/netty-http.log:
--------------------------------------------------------------------------------
1 | 21:11:51.644 INFO httpclient.httpbenchmark 43 main - httpbenchmark start
2 | 21:11:51.757 INFO httpclient.httpbenchmark 89 main - httpbenchmark qps stat timer start
3 | 21:11:51.957 INFO httpclient.httpbenchmarkclient 69 start - all client sockets init success
4 | 21:12:51.898 INFO httpclient.httpbenchmarkclient 74 start - all client sockets shut down success
5 | 21:12:52.400 INFO httpclient.httpbenchmark 122 main - httpbenchmark mail sending success
6 | 21:12:52.400 INFO httpclient.httpbenchmark 128 main - httpbenchmark complete
7 | 12:26:37.510 INFO httpclient.HttpClient 79 main - httpclient start
8 | 12:26:37.512 INFO httpclient.HttpClient 88 main - httpclient help info
9 | 12:26:37.513 INFO httpclient.HttpClient 89 main - httpclient complete
10 | 12:26:49.915 INFO httpclient.HttpClient 79 main - httpclient start
11 | 12:26:50.258 INFO httpclient.HttpClient 116 main - httpclient complete
12 | 12:28:00.448 INFO httpclient.HttpClient 79 main - httpclient start
13 | 12:28:00.682 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
14 | 12:28:00.708 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
15 | 12:28:00.774 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
16 | 12:28:00.775 INFO httpclient.HttpClient 116 main - httpclient complete
17 | 12:28:17.039 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
18 | 12:28:17.040 INFO httpclient.HttpBenchmark 70 main - httpbenchmark help info
19 | 12:28:17.041 INFO httpclient.HttpBenchmark 71 main - httpbenchmark complete
20 | 12:31:29.901 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
21 | 12:31:29.903 INFO httpclient.HttpBenchmark 70 main - httpbenchmark help info
22 | 12:31:29.904 INFO httpclient.HttpBenchmark 71 main - httpbenchmark complete
23 | 12:31:50.266 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
24 | 12:31:50.380 INFO httpclient.HttpBenchmark 89 main - httpbenchmark qps stat timer start
25 | 12:31:50.575 INFO httpclient.HttpBenchmarkClient 69 start - all client sockets init success
26 | 12:32:50.518 INFO httpclient.HttpBenchmarkClient 74 start - all client sockets shut down success
27 | 12:32:51.084 INFO httpclient.HttpBenchmark 122 main - httpbenchmark mail sending success
28 | 12:32:51.085 INFO httpclient.HttpBenchmark 128 main - httpbenchmark complete
29 | 12:33:34.084 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
30 | 12:33:34.194 INFO httpclient.HttpBenchmark 89 main - httpbenchmark qps stat timer start
31 | 12:33:34.410 INFO httpclient.HttpBenchmarkClient 69 start - all client sockets init success
32 | 12:33:54.164 INFO httpclient.HttpClient 79 main - httpclient start
33 | 12:33:54.417 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
34 | 12:33:54.445 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
35 | 12:33:54.528 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
36 | 12:33:54.531 INFO httpclient.HttpClient 116 main - httpclient complete
37 | 12:33:58.775 INFO httpclient.HttpClient 79 main - httpclient start
38 | 12:33:59.012 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
39 | 12:33:59.041 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
40 | 12:33:59.118 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
41 | 12:33:59.121 INFO httpclient.HttpClient 116 main - httpclient complete
42 | 12:34:34.348 INFO httpclient.HttpBenchmarkClient 74 start - all client sockets shut down success
43 | 12:34:34.867 INFO httpclient.HttpBenchmark 122 main - httpbenchmark mail sending success
44 | 12:34:34.868 INFO httpclient.HttpBenchmark 128 main - httpbenchmark complete
45 | 12:36:32.497 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
46 | 12:36:32.608 INFO httpclient.HttpBenchmark 89 main - httpbenchmark qps stat timer start
47 | 12:36:32.828 INFO httpclient.HttpBenchmarkClient 69 start - all client sockets init success
48 | 12:50:19.793 INFO httpclient.HttpBenchmarkClient 74 start - all client sockets shut down success
49 | 12:50:20.497 INFO httpclient.HttpBenchmark 122 main - httpbenchmark mail sending success
50 | 12:50:20.497 INFO httpclient.HttpBenchmark 128 main - httpbenchmark complete
51 | 13:36:08.894 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
52 | 13:36:09.005 INFO httpclient.HttpBenchmark 89 main - httpbenchmark qps stat timer start
53 | 13:36:09.243 INFO httpclient.HttpBenchmarkClient 69 start - all client sockets init success
54 | 13:51:09.175 INFO httpclient.HttpBenchmarkClient 74 start - all client sockets shut down success
55 | 13:51:09.770 INFO httpclient.HttpBenchmark 122 main - httpbenchmark mail sending success
56 | 13:51:09.771 INFO httpclient.HttpBenchmark 128 main - httpbenchmark complete
57 | 17:44:50.341 INFO httpclient.HttpClient 79 main - httpclient start
58 | 17:44:50.343 INFO httpclient.HttpClient 88 main - httpclient help info
59 | 17:44:50.344 INFO httpclient.HttpClient 89 main - httpclient complete
60 | 17:51:25.575 INFO httpclient.HttpClient 79 main - httpclient start
61 | 17:51:25.811 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
62 | 17:51:25.852 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
63 | 17:51:25.924 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
64 | 17:51:25.926 INFO httpclient.HttpClient 116 main - httpclient complete
65 | 17:51:30.177 INFO httpclient.HttpClient 79 main - httpclient start
66 | 17:51:30.411 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
67 | 17:51:30.437 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
68 | 17:51:30.503 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
69 | 17:51:30.505 INFO httpclient.HttpClient 116 main - httpclient complete
70 | 23:30:07.651 INFO httpclient.HttpClient 79 main - httpclient start
71 | 23:30:07.654 INFO httpclient.HttpClient 88 main - httpclient help info
72 | 23:30:07.654 INFO httpclient.HttpClient 89 main - httpclient complete
73 | 23:30:12.818 INFO httpclient.HttpClient 79 main - httpclient start
74 | 23:30:13.050 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
75 | 23:30:13.079 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
76 | 23:30:13.139 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
77 | 23:30:13.140 INFO httpclient.HttpClient 116 main - httpclient complete
78 | 23:30:42.576 INFO httpclient.HttpClient 79 main - httpclient start
79 | 23:30:42.803 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
80 | 23:30:42.829 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
81 | 23:30:42.898 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
82 | 23:30:42.899 INFO httpclient.HttpClient 116 main - httpclient complete
83 | 21:49:35.341 INFO httpclient.HttpClient 79 main - httpclient start
84 | 21:49:35.589 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
85 | 21:49:35.629 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
86 | 21:49:35.714 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
87 | 21:49:35.715 INFO httpclient.HttpClient 116 main - httpclient complete
88 | 21:49:39.978 INFO httpclient.HttpClient 79 main - httpclient start
89 | 21:49:40.209 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
90 | 21:49:40.235 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
91 | 21:49:40.295 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
92 | 21:49:40.297 INFO httpclient.HttpClient 116 main - httpclient complete
93 | 10:09:26.710 INFO httpclient.HttpClient 79 main - httpclient start
94 | 10:09:26.947 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
95 | 10:09:26.972 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
96 | 10:09:27.038 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
97 | 10:09:27.039 INFO httpclient.HttpClient 116 main - httpclient complete
98 | 10:09:31.266 INFO httpclient.HttpClient 79 main - httpclient start
99 | 10:09:31.500 INFO httpclient.HttpClientHandler 25 channelActive - client active ...
100 | 10:09:31.525 INFO httpclient.HttpClientHandler 45 channelRead - client read complete ...
101 | 10:09:31.586 INFO httpclient.HttpClientHandler 53 channelInactive - client inactive ...
102 | 10:09:31.587 INFO httpclient.HttpClient 116 main - httpclient complete
103 | 15:56:52.630 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
104 | 15:56:52.633 INFO httpclient.HttpBenchmark 70 main - httpbenchmark help info
105 | 15:56:52.633 INFO httpclient.HttpBenchmark 71 main - httpbenchmark complete
106 | 15:57:00.582 INFO httpclient.HttpClient 79 main - httpclient start
107 | 15:57:00.584 INFO httpclient.HttpClient 88 main - httpclient help info
108 | 15:57:00.585 INFO httpclient.HttpClient 89 main - httpclient complete
109 | 15:58:47.681 INFO httpclient.HttpBenchmark 43 main - httpbenchmark start
110 | 15:58:47.684 INFO httpclient.HttpBenchmark 70 main - httpbenchmark help info
111 | 15:58:47.684 INFO httpclient.HttpBenchmark 71 main - httpbenchmark complete
112 | 15:58:52.811 INFO httpclient.HttpClient 79 main - httpclient start
113 | 15:58:52.813 INFO httpclient.HttpClient 88 main - httpclient help info
114 | 15:58:52.813 INFO httpclient.HttpClient 89 main - httpclient complete
115 |
--------------------------------------------------------------------------------
/log/simplehttpserver.log:
--------------------------------------------------------------------------------
1 | 16:33:45.039 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:4444
2 | 16:35:25.217 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:4444
3 | 16:35:49.757 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:8000
4 | 16:36:33.600 DEBUG httpclient.asynchttpserverhandler 29 channelActive - remote address : /127.0.0.1:60547 active
5 | 16:36:33.614 DEBUG httpclient.asynchttpserverhandler 42 channelRead - cnt : {"service":"UserService","method":"GetNuomiUserPreference","request":{"header":{"subservice":"sub","secretkey":"pass","servicekey":"key1"},"id_type":2,"id":"3uiuiueiukjfdkj:FG=3","data_type":100}}
6 | 16:36:33.634 DEBUG httpclient.asynchttpserverhandler 63 channelInactive - remote address : /127.0.0.1:60547 inactive
7 | 16:38:17.151 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:8000
8 | 18:29:23.268 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:4444
9 | 18:29:46.352 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:4444
10 | 18:30:02.933 INFO httpclient.asynchttpserver 51 start - httpclient.asynchttpserver started and listen on /0.0.0.0:8000
11 | 12:24:11.457 INFO httpclient.AsyncHttpServer 51 start - httpclient.AsyncHttpServer started and listen on /0.0.0.0:4444
12 | 17:51:02.815 INFO httpclient.AsyncHttpServer 51 start - httpclient.AsyncHttpServer started and listen on /0.0.0.0:4444
13 | 15:57:05.423 INFO httpclient.AsyncHttpServer 51 start - httpclient.AsyncHttpServer started and listen on /0.0.0.0:4444
14 | 15:58:59.147 INFO httpclient.AsyncHttpServer 51 start - httpclient.AsyncHttpServer started and listen on /0.0.0.0:4444
15 |
--------------------------------------------------------------------------------
/scrshot/mail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/scrshot/mail.png
--------------------------------------------------------------------------------
/simplehttpserver.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/simplehttpserver.jar
--------------------------------------------------------------------------------
/src/httpclient/AsyncHttpServer.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import io.netty.bootstrap.ServerBootstrap;
4 | import io.netty.channel.ChannelFuture;
5 | import io.netty.channel.ChannelInitializer;
6 | import io.netty.channel.ChannelOption;
7 | import io.netty.channel.ChannelPipeline;
8 | import io.netty.channel.EventLoopGroup;
9 | import io.netty.channel.nio.NioEventLoopGroup;
10 | import io.netty.channel.socket.SocketChannel;
11 | import io.netty.channel.socket.nio.NioServerSocketChannel;
12 | import io.netty.handler.codec.http.HttpRequestDecoder;
13 | import io.netty.handler.codec.http.HttpResponseEncoder;
14 |
15 | import org.apache.logging.log4j.LogManager;
16 | import org.apache.logging.log4j.Logger;
17 |
18 | public class AsyncHttpServer {
19 | private int port;
20 | private int backlog = 128;
21 | private Logger logger;
22 |
23 | public AsyncHttpServer(int port) {
24 | // TODO Auto-generated constructor stub
25 | this.port = port;
26 | LogLib.loginitsrv();
27 | this.logger = LogManager.getLogger(AsyncHttpServer.class.getName());
28 | }
29 | public void start() throws Exception {
30 | EventLoopGroup bossGroup = new NioEventLoopGroup();
31 | EventLoopGroup workGroup = new NioEventLoopGroup();
32 | try {
33 | ServerBootstrap b = new ServerBootstrap();
34 | b.group(bossGroup, workGroup);
35 | b.channel(NioServerSocketChannel.class);
36 | //b.handler(new LoggingHandler(LogLevel.INFO));
37 | b.childHandler(new ChannelInitializer() {
38 | @Override
39 | protected void initChannel(SocketChannel ch) throws Exception {
40 | // TODO Auto-generated method stub
41 | ChannelPipeline p = ch.pipeline();
42 | p.addLast(new HttpResponseEncoder());
43 | p.addLast(new HttpRequestDecoder());
44 | p.addLast(new AsyncHttpServerHandler());
45 | }
46 |
47 | });
48 | b.option(ChannelOption.SO_BACKLOG, this.backlog);
49 | b.option(ChannelOption.SO_KEEPALIVE, true);
50 | ChannelFuture f = b.bind(this.port).sync();
51 | logger.info(AsyncHttpServer.class.getName() + " started and listen on " + f.channel().localAddress());
52 | f.channel().closeFuture().sync();
53 | logger.info(AsyncHttpServer.class.getName() + " closed listen channel");
54 | } finally {
55 | // TODO: handle exception
56 | workGroup.shutdownGracefully();
57 | bossGroup.shutdownGracefully();
58 | logger.info(AsyncHttpServer.class.getName() + " closed boss and worker group");
59 | }
60 | }
61 |
62 |
63 | public static void main(String[] args) {
64 | // TODO Auto-generated method stub
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/src/httpclient/AsyncHttpServerHandler.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import io.netty.buffer.ByteBuf;
4 | import io.netty.buffer.Unpooled;
5 | import io.netty.channel.ChannelHandlerContext;
6 | import io.netty.channel.ChannelInboundHandlerAdapter;
7 | import io.netty.handler.codec.http.DefaultFullHttpResponse;
8 | import io.netty.handler.codec.http.FullHttpResponse;
9 | import io.netty.handler.codec.http.HttpContent;
10 | import io.netty.handler.codec.http.HttpHeaders;
11 | import io.netty.handler.codec.http.HttpRequest;
12 | import io.netty.handler.codec.http.HttpResponseStatus;
13 | import io.netty.handler.codec.http.HttpVersion;
14 |
15 | import org.apache.logging.log4j.LogManager;
16 | import org.apache.logging.log4j.Logger;
17 |
18 | public class AsyncHttpServerHandler extends ChannelInboundHandlerAdapter {
19 | private HttpRequest request;
20 | private Logger logger;
21 |
22 | public AsyncHttpServerHandler() {
23 | // TODO Auto-generated constructor stub
24 | LogLib.loginitsrv();
25 | this.logger = LogManager.getLogger(AsyncHttpServerHandler.class.getName());
26 | }
27 | @Override
28 | public void channelActive(ChannelHandlerContext ctx) throws Exception {
29 | logger.debug("remote address : " + ctx.channel().remoteAddress() + " active");
30 | super.channelActive(ctx);
31 | }
32 | @Override
33 | public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
34 | if (msg instanceof HttpRequest) {
35 | request = (HttpRequest) msg;
36 | //String url = request.getUri();
37 | //System.out.println("url : " + url);
38 | }
39 | if (msg instanceof HttpContent) {
40 | HttpContent content = (HttpContent) msg;
41 | ByteBuf buf = content.content();
42 | logger.debug("cnt : " + buf.toString(io.netty.util.CharsetUtil.UTF_8));
43 | buf.release();
44 |
45 | String res = "hello world !!!";
46 | FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
47 | HttpResponseStatus.OK, Unpooled.wrappedBuffer(res.getBytes("UTF-8")));
48 | response.headers().set(HttpHeaders.Names.CONTENT_TYPE, "text/plain");
49 | response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, response.content().readableBytes());
50 | if (HttpHeaders.isKeepAlive(this.request)) {
51 | response.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE);
52 | }
53 | ctx.write(response);
54 | ctx.flush();
55 | }
56 | }
57 | @Override
58 | public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
59 | ctx.flush();
60 | }
61 | @Override
62 | public void channelInactive(ChannelHandlerContext ctx) throws Exception {
63 | logger.debug("remote address : " + ctx.channel().remoteAddress() + " inactive");
64 | super.channelInactive(ctx);
65 | }
66 | @Override
67 | public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
68 | logger.error(cause.toString());
69 | ctx.close();
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/src/httpclient/FileLib.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import java.io.BufferedReader;
4 | import java.io.FileInputStream;
5 | import java.io.InputStreamReader;
6 |
7 | import net.sf.json.JSONObject;
8 |
9 | public class FileLib {
10 | private String filepath;
11 |
12 | public FileLib(String filepath) {
13 | // TODO Auto-generated constructor stub
14 | this.filepath = filepath;
15 | }
16 |
17 | public String gettestdatastring () throws Exception {
18 | FileInputStream fis = new FileInputStream(this.filepath);
19 | InputStreamReader isr = new InputStreamReader(fis,"utf-8");
20 | BufferedReader br = new BufferedReader(isr);
21 |
22 | StringBuilder testdatastring = new StringBuilder();
23 | String line = "";
24 | while ((line = br.readLine()) != null) {
25 | testdatastring.append(line);
26 | }
27 | fis.close();
28 | return testdatastring.toString();
29 | }
30 | public JSONObject getjsondata(String datastr) {
31 | JSONObject jsondata = JSONObject.fromObject(datastr);
32 | return jsondata;
33 | }
34 | public static void main(String[] args) {
35 | // TODO Auto-generated method stub
36 | String filepath = "./testdata/http_function_test.data";
37 | try {
38 | FileLib f = new FileLib(filepath);
39 | String datastr = f.gettestdatastring();
40 | System.out.println(datastr);
41 | JSONObject jsondata = f.getjsondata(datastr);
42 | String method = jsondata.getString("method");
43 | String url = jsondata.getString("url");
44 | String content = jsondata.getJSONObject("data").toString();
45 | System.out.println(method);
46 | System.out.println(url);
47 | System.out.println(content);
48 |
49 | } catch (Exception e) {
50 | // TODO: handle exception
51 | e.printStackTrace();
52 | }
53 |
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/httpclient/HelpLib.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | public class HelpLib {
4 |
5 | public HelpLib() {
6 | // TODO Auto-generated constructor stub
7 | }
8 |
9 | public static void disinfo (String pluginname) {
10 | if (pluginname.equals("httpbenchmark.jar")) {
11 | System.out.println("======================================================================================");
12 | System.out.println("| Usage Instructions |");
13 | System.out.println("======================================================================================");
14 | System.out.println("|USAGE : java -jar " + pluginname + " ");
15 | System.out.println("| IP : sever ip, eg : 127.0.0.1 ");
16 | System.out.println("| PORT : server port, eg : 18999 ");
17 | System.out.println("| CLIENT_NUM : total socket connection numbers. eg : 20 ");
18 | System.out.println("| TEST_TIME : total test time(min), eg : 1.0 ");
19 | System.out.println("| IS_OUTPUT : flag of whether print the response content. eg : 0 ");
20 | System.out.println("| TEST_DATA : test data file path. eg : ./data/http_benchmark_post.data ");
21 | System.out.println("| RECEIVER : mail receiver list. eg : yangjun03@baidu.com,linqiaoying@baidu.com \n|");
22 | System.out.println("|EXAMPLE : java -jar " + pluginname + " 127.0.0.1 18999 20 1.0 0 ./data/http_benchmark_post.data yangjun03@baidu.com");
23 | System.out.println("|-------------------------------------------------------------------------------------");
24 | System.out.println("|MORE : if any questions, please contact 597092663@qq.com ");
25 | System.out.println("======================================================================================");
26 | } else if (pluginname.equals("httpclient.jar")) {
27 | System.out.println("======================================================================================");
28 | System.out.println("| Usage Instructions |");
29 | System.out.println("======================================================================================");
30 | System.out.println("|USAGE : java -jar " + pluginname + " ");
31 | System.out.println("| IP : sever ip, eg : 127.0.0.1 ");
32 | System.out.println("| PORT : server port, eg : 18999 ");
33 | System.out.println("| TestData : request data. eg : ./data/http_function_post.data \n|");
34 | System.out.println("|EXAMPLE : java -jar " + pluginname + " 127.0.0.1 18999 ./data/http_function_post.data");
35 | System.out.println("|-------------------------------------------------------------------------------------");
36 | System.out.println("|MORE : if any questions, please contact 597092663@qq.com ");
37 | System.out.println("======================================================================================");
38 | }
39 | }
40 | public static void main(String[] args) {
41 | // TODO Auto-generated method stub
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/httpclient/HttpBenchmark.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import java.io.FileInputStream;
4 | import java.text.DecimalFormat;
5 | import java.text.SimpleDateFormat;
6 | import java.util.Date;
7 | import java.util.LinkedHashMap;
8 | import java.util.Map;
9 | import java.util.Properties;
10 |
11 | import javax.mail.util.ByteArrayDataSource;
12 |
13 | import org.apache.logging.log4j.LogManager;
14 | import org.apache.logging.log4j.Logger;
15 |
16 | import net.sf.json.JSONObject;
17 |
18 | public class HttpBenchmark {
19 | public static long start_time = 0;
20 | public static long end_time = 0;
21 | public static long total_req = 0;
22 | public static long total_res = 0;
23 | public static long total_err = 0;
24 | public static long below_10 = 0;
25 | public static long between_10_20 = 0;
26 | public static long between_20_30 = 0;
27 | public static long over_30 = 0;
28 | public static long total_res_time = 0;
29 |
30 | public static byte[] lock = new byte[0];
31 |
32 | public static Map qps_stat = new LinkedHashMap();
33 | public static ByteArrayDataSource datasource;
34 |
35 | public HttpBenchmark() {
36 | // TODO Auto-generated constructor stub
37 | }
38 |
39 | public static void main(String[] args) {
40 | // TODO Auto-generated method stub
41 | LogLib.loginit();
42 | Logger logger = LogManager.getLogger(HttpClient.class.getName());
43 | logger.info("httpbenchmark start");
44 |
45 | String host;
46 | int port;
47 | int client_num;
48 | double test_time;
49 | int print_res;
50 | String filepath;
51 | JSONObject jsondata;
52 | String[] receivers;
53 |
54 | if (args.length == 7) {
55 | try {
56 | host = args[0];
57 | port = Integer.parseInt(args[1]);
58 | client_num = Integer.parseInt(args[2]);
59 | test_time = Double.parseDouble(args[3]);
60 | print_res = Integer.parseInt(args[4]);
61 | filepath = args[5];
62 | receivers = args[6].split(",");
63 | } catch (Exception e) {
64 | // TODO: handle exception
65 | logger.error(e.toString());
66 | return;
67 | }
68 | } else {
69 | HelpLib.disinfo("httpbenchmark.jar");
70 | logger.info("httpbenchmark help info");
71 | logger.info("httpbenchmark complete");
72 | return;
73 | }
74 |
75 | try {
76 | FileLib f = new FileLib(filepath);
77 | String datastr = f.gettestdatastring();
78 | jsondata = f.getjsondata(datastr);
79 | } catch (Exception e) {
80 | // TODO: handle exception
81 | logger.error("ERROR : test data file parse error");
82 | return;
83 | }
84 |
85 |
86 | QPSStatTimer q = new QPSStatTimer();
87 | try {
88 | q.run();
89 | logger.info("httpbenchmark qps stat timer start");
90 | new HttpBenchmarkClient(host, port, client_num, test_time, print_res, jsondata).start();
91 | } catch (Exception e) {
92 | if (print_res == 1) {
93 | logger.error(e.toString());
94 | }
95 | } finally {
96 | Date dates = new Date(start_time);
97 | Date datee = new Date(end_time);
98 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
99 | String st = sdf.format(dates);
100 | String et = sdf.format(datee);
101 |
102 | DecimalFormat df = new DecimalFormat("0.00");
103 | int tn = Runtime.getRuntime().availableProcessors() * 2;
104 |
105 | String qps = df.format((total_res / (test_time * 60)));
106 | String avg_latency;
107 | if (total_res == 0) {
108 | avg_latency = "0";
109 | } else {
110 | avg_latency = df.format((double) total_res_time / (double) total_res);
111 | }
112 |
113 | try {
114 | TestReportLib.pub(st, et, tn, client_num, test_time, total_req, total_res, total_err,
115 | qps, avg_latency, below_10, between_10_20, between_20_30, over_30);
116 | Properties prop = new Properties();
117 | prop.load(new FileInputStream("./conf/httpbenchmark.conf"));
118 | String mailserver = prop.getProperty("mailserver");
119 | String sender = prop.getProperty("sender");
120 | q.disstat();
121 | MailSendLib.run(mailserver, sender, receivers, st, et, tn, client_num, test_time,
122 | total_req, total_res, total_err, qps, avg_latency, below_10, between_10_20, between_20_30, over_30);
123 | q.stop();
124 | logger.info("httpbenchmark mail sending success");
125 | } catch (Exception e2) {
126 | // TODO: handle exception
127 | logger.error(e2.toString());
128 | return;
129 | } finally {
130 | logger.info("httpbenchmark complete");
131 | }
132 | }
133 | }
134 |
135 | }
136 |
--------------------------------------------------------------------------------
/src/httpclient/HttpBenchmarkClient.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import io.netty.bootstrap.Bootstrap;
4 | import io.netty.channel.ChannelFuture;
5 | import io.netty.channel.ChannelInitializer;
6 | import io.netty.channel.ChannelOption;
7 | import io.netty.channel.EventLoopGroup;
8 | import io.netty.channel.nio.NioEventLoopGroup;
9 | import io.netty.channel.socket.SocketChannel;
10 | import io.netty.channel.socket.nio.NioSocketChannel;
11 | import io.netty.handler.codec.http.HttpRequestEncoder;
12 | import io.netty.handler.codec.http.HttpResponseDecoder;
13 |
14 | import java.util.ArrayList;
15 |
16 | import org.apache.logging.log4j.LogManager;
17 | import org.apache.logging.log4j.Logger;
18 |
19 | import net.sf.json.JSONObject;
20 |
21 | public class HttpBenchmarkClient {
22 | private String host;
23 | private int port;
24 | private int client_num;
25 | private double test_time;
26 | private int print_res;
27 | private JSONObject jsondata;
28 |
29 | private Logger logger;
30 |
31 | public HttpBenchmarkClient(String host, int port, int client_num, double test_time, int print_res, JSONObject jsondata) {
32 | // TODO Auto-generated constructor stub
33 | this.host = host;
34 | this.port = port;
35 | this.client_num = client_num;
36 | this.test_time = test_time;
37 | this.print_res = print_res;
38 | this.jsondata = jsondata;
39 |
40 | LogLib.loginit();
41 | this.logger = LogManager.getLogger(HttpBenchmarkClient.class.getName());
42 | }
43 |
44 | public void start() throws Exception {
45 | EventLoopGroup group;
46 | group = new NioEventLoopGroup();
47 |
48 | HttpBenchmark.start_time = System.currentTimeMillis();
49 | HttpBenchmark.end_time = HttpBenchmark.start_time + (long) this.test_time * 60 * 1000;
50 | try {
51 | Bootstrap b = new Bootstrap();
52 | b.group(group);
53 | b.channel(NioSocketChannel.class);
54 | b.option(ChannelOption.SO_KEEPALIVE, true);
55 | b.handler(new ChannelInitializer() {
56 | @Override
57 | protected void initChannel(SocketChannel ch) throws Exception {
58 | // TODO Auto-generated method stub
59 | ch.pipeline().addLast(new HttpRequestEncoder());
60 | ch.pipeline().addLast(new HttpResponseDecoder());
61 | ch.pipeline().addLast(new HttpBenchmarkClientHandler(host, port, HttpBenchmark.end_time, print_res, jsondata));
62 | }
63 | });
64 | ArrayList channelfuture_list = new ArrayList();
65 | for (int i = 0; i < this.client_num; i++) {
66 | ChannelFuture f = b.connect(this.host, this.port);
67 | channelfuture_list.add(f);
68 | }
69 | logger.info("all client sockets init success");
70 |
71 | for (int i = 0; i < channelfuture_list.size(); i++) {
72 | channelfuture_list.get(i).channel().closeFuture().sync();
73 | }
74 | logger.info("all client sockets shut down success");
75 | } finally {
76 | group.shutdownGracefully();
77 | }
78 | }
79 |
80 | public static void main(String[] args) {
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/src/httpclient/HttpBenchmarkClientHandler.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/src/httpclient/HttpBenchmarkClientHandler.java
--------------------------------------------------------------------------------
/src/httpclient/HttpClient.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/src/httpclient/HttpClient.java
--------------------------------------------------------------------------------
/src/httpclient/HttpClientHandler.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/src/httpclient/HttpClientHandler.java
--------------------------------------------------------------------------------
/src/httpclient/LogLib.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/src/httpclient/LogLib.java
--------------------------------------------------------------------------------
/src/httpclient/MailSendLib.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/src/httpclient/MailSendLib.java
--------------------------------------------------------------------------------
/src/httpclient/QPSStatTimer.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import java.text.DecimalFormat;
4 | import java.text.SimpleDateFormat;
5 | import java.util.Date;
6 | import java.util.concurrent.Executors;
7 | import java.util.concurrent.ScheduledExecutorService;
8 | import java.util.concurrent.TimeUnit;
9 |
10 | class timmer implements Runnable {
11 |
12 | @Override
13 | public void run() {
14 | // TODO Auto-generated method stub
15 | synchronized (HttpBenchmark.lock) {
16 | Date date = new Date();
17 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
18 | String ct = sdf.format(date);
19 | //System.err.println(ct);
20 |
21 | DecimalFormat df = new DecimalFormat("0.00");
22 | double elapsed = (System.currentTimeMillis() - HttpBenchmark.start_time) / 1000.0;
23 | String qps = df.format((HttpBenchmark.total_res / (elapsed)));
24 | HttpBenchmark.qps_stat.put(ct, qps);
25 | //强制垃圾回收,防止内存泄漏
26 | System.gc();
27 | }
28 | }
29 |
30 | }
31 | public class QPSStatTimer {
32 | private ScheduledExecutorService service;
33 | public QPSStatTimer() {
34 | // TODO Auto-generated constructor stub
35 | this.service = Executors.newSingleThreadScheduledExecutor();
36 | //this.service = Executors.newScheduledThreadPool(4);
37 | }
38 | public void run() {
39 | try {
40 | this.service.scheduleAtFixedRate(new timmer(), 0, 60, TimeUnit.SECONDS);
41 | } catch (Exception e) {
42 | // TODO: handle exception
43 | //e.printStackTrace();
44 | }
45 | }
46 | public void disstat() {
47 | /*Iterator> iter = easysocketbenchmark.qps_stat.entrySet().iterator();
48 | while (iter.hasNext()) {
49 | Map.Entry entry = iter.next();
50 | System.out.println(entry.getKey() + "\t" + entry.getValue());
51 | }*/
52 | new StatChartLib().createChart();
53 | }
54 |
55 | public void stop() {
56 | this.service.shutdown();
57 | }
58 |
59 | public static void main(String[] args) {
60 | // TODO Auto-generated method stub
61 | QPSStatTimer q = new QPSStatTimer();
62 | try {
63 | System.err.println("ok");
64 | q.run();
65 | System.err.println("ok");
66 | } catch (Exception e) {
67 | // TODO: handle exception
68 | } finally {
69 | System.err.println("stop");
70 | q.stop();
71 | }
72 |
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/httpclient/SendThread.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | import io.netty.buffer.Unpooled;
4 | import io.netty.channel.Channel;
5 | import io.netty.handler.codec.http.DefaultFullHttpRequest;
6 | import io.netty.handler.codec.http.HttpHeaders;
7 | import io.netty.handler.codec.http.HttpMethod;
8 | import io.netty.handler.codec.http.HttpVersion;
9 |
10 | import java.net.URI;
11 | import java.net.URISyntaxException;
12 |
13 | import org.apache.logging.log4j.LogManager;
14 | import org.apache.logging.log4j.Logger;
15 |
16 | public class SendThread implements Runnable {
17 | private Channel channel;
18 | private String host;
19 | //private int port;
20 | private String method;
21 | private String url;
22 | private String content;
23 |
24 | private Logger logger;
25 |
26 | public SendThread(Channel channel, String host, int port, String method, String url, String content) {
27 | // TODO Auto-generated constructor stub
28 | this.channel = channel;
29 | this.host = host;
30 | //this.port = port;
31 | this.method = method;
32 | this.url = url;
33 | this.content = content;
34 | LogLib.loginit();
35 | this.logger = LogManager.getLogger(SendThread.class.getName());
36 | }
37 |
38 | @Override
39 | public void run() {
40 | // TODO Auto-generated method stub
41 | DefaultFullHttpRequest request;
42 | URI uri = null;
43 | try {
44 | uri = new URI(this.url);
45 | } catch (URISyntaxException e) {
46 | // TODO Auto-generated catch block
47 | //e.printStackTrace();
48 | this.logger.error(e.toString());
49 | }
50 |
51 | if (this.method.equals("POST")) {
52 | request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,
53 | HttpMethod.POST, uri.toASCIIString(), Unpooled.wrappedBuffer(this.content.getBytes()));
54 | } else if (this.method.equals("GET")) {
55 | request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,
56 | HttpMethod.GET, uri.toASCIIString(), null);
57 | } else {
58 | //System.out.println("ERROR : not supported http method");
59 | this.logger.error("not supported http method");
60 | return;
61 | }
62 |
63 | request.headers().set(HttpHeaders.Names.HOST, this.host);
64 | request.headers().set(HttpHeaders.Names.CONTENT_TYPE, "application/json;charset=utf-8");
65 | request.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE);
66 | request.headers().set(HttpHeaders.Names.CONTENT_LENGTH, request.content().readableBytes());
67 |
68 | this.channel.write(request);
69 | this.channel.flush();
70 | //System.out.println("client write ...");
71 | this.logger.debug("client write ...");
72 | }
73 |
74 | public static void main(String[] args) {
75 | // TODO Auto-generated method stub
76 |
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/httpclient/SimpleHttpServer.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | public class SimpleHttpServer {
4 |
5 | public SimpleHttpServer() {
6 | // TODO Auto-generated constructor stub
7 | }
8 |
9 | public static void main(String[] args) {
10 | // TODO Auto-generated method stub
11 | int port;
12 | if (args.length == 1) {
13 | port = Integer.parseInt(args[0]);
14 | } else {
15 | port = 4444;
16 | }
17 | try {
18 | new AsyncHttpServer(port).start();
19 | } catch (Exception e) {
20 | // TODO: handle exception
21 | e.printStackTrace();
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/httpclient/StatChartLib.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junneyang/http-benchmark-netty/ae824003ad602a63e1785ff44c4438b155de40da/src/httpclient/StatChartLib.java
--------------------------------------------------------------------------------
/src/httpclient/TestReportLib.java:
--------------------------------------------------------------------------------
1 | package httpclient;
2 |
3 | public class TestReportLib {
4 |
5 | public TestReportLib() {
6 | // TODO Auto-generated constructor stub
7 | }
8 |
9 | public static void pub(String start_time, String end_time, int thread_num, int client_num, double test_time,
10 | long total_req, long total_res, long total_err, String qps, String avg_latency,
11 | long below_10, long between_10_20, long between_20_30, long over_30) throws Exception {
12 | System.out.println("======================================================================================");
13 | System.out.println("| TEST REPORT |");
14 | System.out.println("======================================================================================");
15 | System.out.println("| START_TIME : " + start_time);
16 | System.out.println("| END_TIME : " + end_time);
17 | System.out.println("|-------------------------------------------------------------------------------------");
18 | System.out.println("| THREAD_NUM : " + thread_num);
19 | System.out.println("| CLIENT_NUM : " + client_num);
20 | System.out.println("| TEST_TIME : " + test_time + " min");
21 | System.out.println("|-------------------------------------------------------------------------------------");
22 | System.out.println("| TOTAL_REQ : " + total_req);
23 | System.out.println("| TOTAL_RES : " + total_res);
24 | System.out.println("| TOTAL_ERR : " + total_err);
25 | System.out.println("| QPS : " + qps);
26 | System.out.println("|-------------------------------------------------------------------------------------");
27 | System.out.println("| AVG_LATENCY : " + avg_latency + " ms");
28 | System.out.println("| BELOW_10 : " + below_10);
29 | System.out.println("| BT_10_20 : " + between_10_20);
30 | System.out.println("| BT_20_30 : " + between_20_30);
31 | System.out.println("| OVER_30 : " + over_30);
32 | System.out.println("======================================================================================");
33 | }
34 | public static void main(String[] args) {
35 | // TODO Auto-generated method stub
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------