你可以查看中文版的说明:README_CN.md
[TOC]
This procedure is mainly based on WRK to remove SSL and Lua dependence, using TCPINI configuration to achieve the TCP protocol under the stress test.
cd wrktcp && make
cd wrktcp && make
需要下载编译器,或者直接下载release版本。
[common]
host = 127.0.0.1
port = 8000
[request]
req_body = this is a test
wrktcp -t2 -c20 -d10s --latency sample_tiny.ini
Similar to WRK, this command represents the following: Use 2 threads (-T2), 20 concurrent connections (-c20), keep running for 5 seconds (-d5s), run with configuration sample_tiny.ini.
Running 10s test @ 127.0.0.1:8000 using sample_tiny.ini
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 23.02ms 43.78ms 356.62ms 94.88%
Req/Sec 354.37 74.31 454.50 90.62%
Latency Distribution
50% 12.99ms
75% 14.02ms
90% 15.74ms
99% 274.89ms
6862 requests in 10.11s, 140.72KB read
Requests/sec: 678.90
Requests/sec-Success: 678.90
Requests/sec-Failure: 0.00
Transfer/sec: 13.92KB
-t, --threads: Use the total number of threads, generally recommended to use 2 times the number of CPU cores -1
-c, --connections: Total number of connections, regardless of thread. The number of connections per thread is connections/ Threads
-d, --duration: write 2S, 2m, 2h
--latency: distribution of printing delay
--timeout: Specify timeout, default is 5 minutes, longer takes up more statistical memory. --realtime refreshes TPS information in realtime and records TPS and delayed process data to generate HTML
-v --version: Print version information
Running 10s test @ 127.0.0.1:8000 using sample_tiny.ini 2 threads and 10 connections
Represents the base case of the command and the base case of the connection. The program executes the load and prints as soon as it completes the configuration.
Thread Stats Avg Stdev Max +/- Stdev Latency 23.02ms 43.78ms 356.62ms 94.88% Req/Sec 354.37 74.31 454.50 90.62%
Latency represents Latency time, and Req/Sec represents the number of successful response strokes per second (TPS). It should be noted that this part of the Latency data is the data of a single thread.
Description: Thread Stats, mean (Avg), standard deviation (Stdev), maximum (Max), percentage of data within one standard deviation (+/ -stdev)
If the pressure measuring system is stable, the mean and the maximum are expected to be the same, the expected standard deviation is 0, and the expected standard deviation is 100%.
Latency Distribution 50% 12.99ms 75% 14.02ms 90% 15.74ms 99% 274.89ms
The statistics of the delay distribution, 50% to 99%, are sorted by corresponding time. So 50% is what's the 50th data delay and 99% is what's the 99th data delay.
6862 requests in 10.11s, 140.72KB read
Requests/sec: 678.90 Requests/sec-Success: 678.90 Requests/sec-Failure: 0.00 Transfer/sec: 13.92KB
The first line represents: 6862 requests in 10.11 seconds, with a total of 140.72KB read.
Requests/sec: 678.90 The total request TPS, containing the total number of successes and failures, is the same as WRK.
Requests/sec-Success & Requests/sec-Failure : Is to distinguish whether the business reply was successful or not, it may have been correctly answered, but the message returned is an error message.
Transfer/sec: The size of the transmitted data per second.
[common]
host = 127.0.0.1
port = 8000
[request]
# The length of the message's length, 8 by default
req_len_len = 8
# length is all or only calculated body, the default is the optional body configuration of total
req_len_type = body
# request head, default length only
req_head = $(length)
# The content of the request body
req_body = \
<root>\
<date>$(DATE)</date>\
<branch>$(BRANCH)</branch>\
<traceno>20201222$(TRACENO)</branch>\
<term>$(TERMNO)</term>\
<bankno>313233000017</bankno>\
<name>sam</name>\
</root>
[response]
# Then head length
rsp_headlen = 16
# The length's location in the message ,1 is default
rsp_len_beg = 5
# The length of the message's length, 8 by default
rsp_len_len = 8
# length is all or only calculated body, the default is the optional body configuration of total
rsp_len_type = body
# response code type, default is fixed, optional is xml,json and to be continued
rsp_code_type = xml
# response code location, body or head
rsp_code_location = body
# the tag of the response code
rsp_code_localtion_tag = <retCode>
# response code success
rsp_code_success = 000000
[paramters]
DATE = DATETIME, "%H:%M:S"
BRANCH = FILE, branch.txt
TRACENO = COUNTER, 100, 100000, 2, "%08ld"
TERMNO = CONNECTID
here are sharp contrasts in the WRK2 article on addressing the Coordinated omission of :https://blog.csdn.net/minxihou/article/details/97318121
The reasons for not extending from WRK2, personal point of view is that the author is technically correct, but has no practical value from a practical engineering point of view. For two reasons: First, under normal circumstances, pressure measurement is expected to have a better result. Second, if it is the pressure measurement software will have the statistical caliber problem, then even if the statistical method has problems, but because it is a unified statistical caliber and method, so it is reliable.
Therefore, it is more important to have a unified approach to communication than to have a clear understanding of what software to use and whether coordination omissions are eliminated in every discussion of TPS.
WRKTCP is an extended development based on WRK. Of course, WRK is also the use of a large number of Redis, Nignx, Luajit source code, use and extension, please pay attention to the corresponding open source library protocols.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.