README.md 13.6 KB
Newer Older
小傅哥's avatar
小傅哥 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494
## 0. no-pool

(base) fuzhengwei1@ZBMac-GV47H1GXD ~ % ab -c 20 -n 600 http://127.0.0.1:8091/api/mysql/insert
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Finished 600 requests


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/insert
Document Length:        23 bytes

Concurrency Level:      20
Time taken for tests:   9.267 seconds
Complete requests:      600
Failed requests:        0
Total transferred:      93600 bytes
HTML transferred:       13800 bytes
Requests per second:    64.74 [#/sec] (mean)
Time per request:       308.911 [ms] (mean)
Time per request:       15.446 [ms] (mean, across all concurrent requests)
Transfer rate:          9.86 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       2
Processing:    65  276 182.2    217    1022
Waiting:       65  269 177.1    212    1000
Total:         65  276 182.3    218    1023

Percentage of the requests served within a certain time (ms)
50%    218
66%    283
75%    353
80%    389
90%    534
95%    745
98%    808
99%    821
100%   1023 (longest request)

## 1. C3P0

ab -c 20 -n 600 http://127.0.0.1:8091/api/mysql/insert

This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Finished 600 requests


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/insert
Document Length:        23 bytes

Concurrency Level:      20
Time taken for tests:   3.729 seconds
Complete requests:      600
Failed requests:        0
Total transferred:      93600 bytes
HTML transferred:       13800 bytes
Requests per second:    160.88 [#/sec] (mean)
Time per request:       124.314 [ms] (mean)
Time per request:       6.216 [ms] (mean, across all concurrent requests)
Transfer rate:          24.51 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       2
Processing:    15   99  82.8     74     787
Waiting:       13   93  80.3     70     763
Total:         15  100  82.9     74     787

Percentage of the requests served within a certain time (ms)
50%     74
66%    112
75%    135
80%    147
90%    219
95%    256
98%    361
99%    378
100%    787 (longest request)

## 2. DBCP

(base) fuzhengwei1@ZBMac-GV47H1GXD ~ % ab -c 20 -n 600 http://127.0.0.1:8091/api/mysql/insert
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Finished 600 requests


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/insert
Document Length:        23 bytes

Concurrency Level:      20
Time taken for tests:   4.174 seconds
Complete requests:      600
Failed requests:        0
Total transferred:      93600 bytes
HTML transferred:       13800 bytes
Requests per second:    143.74 [#/sec] (mean)
Time per request:       139.140 [ms] (mean)
Time per request:       6.957 [ms] (mean, across all concurrent requests)
Transfer rate:          21.90 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       3
Processing:    15  107  92.8     83     997
Waiting:       15  101  89.3     77     987
Total:         15  107  93.0     83     997

Percentage of the requests served within a certain time (ms)
50%     83
66%    103
75%    121
80%    131
90%    204
95%    253
98%    474
99%    482
100%    997 (longest request)

## druid

fuzhengwei1@ZBMac-GV47H1GXD ~ % ab -c 20 -n 600 http://127.0.0.1:8091/api/mysql/insert
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Finished 600 requests


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/insert
Document Length:        23 bytes

Concurrency Level:      20
Time taken for tests:   4.885 seconds
Complete requests:      600
Failed requests:        0
Total transferred:      93600 bytes
HTML transferred:       13800 bytes
Requests per second:    122.83 [#/sec] (mean)
Time per request:       162.827 [ms] (mean)
Time per request:       8.141 [ms] (mean, across all concurrent requests)
Transfer rate:          18.71 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       2
Processing:    39  144  85.3    121     568
Waiting:       38  138  80.0    115     550
Total:         40  145  85.2    122     568

Percentage of the requests served within a certain time (ms)
50%    122
66%    168
75%    193
80%    205
90%    247
95%    353
98%    395
99%    427
100%    568 (longest request)

## hikari

(base) fuzhengwei1@ZBMac-GV47H1GXD ~ % ab -c 20 -n 600 http://127.0.0.1:8091/api/mysql/insert
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Finished 600 requests


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/insert
Document Length:        23 bytes

Concurrency Level:      20
Time taken for tests:   3.793 seconds
Complete requests:      600
Failed requests:        0
Total transferred:      93600 bytes
HTML transferred:       13800 bytes
Requests per second:    158.20 [#/sec] (mean)
Time per request:       126.420 [ms] (mean)
Time per request:       6.321 [ms] (mean, across all concurrent requests)
Transfer rate:          24.10 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.6      0       8
Processing:    13   98  64.2     86     915
Waiting:       12   93  62.6     80     883
Total:         14   98  64.1     86     916

Percentage of the requests served within a certain time (ms)
50%     86
66%    111
75%    136
80%    147
90%    180
95%    199
98%    217
99%    271
100%    916 (longest request)

## 测试;插入、无索引更新、有索引更新

### 1. 插入

(base) fuzhengwei1@ZBMac-GV47H1GXD ~ % ab -c 20 -n 600 http://127.0.0.1:8091/api/mysql/insert
This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Finished 600 requests


Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/insert
Document Length:        23 bytes

Concurrency Level:      20
Time taken for tests:   4.009 seconds
Complete requests:      600
Failed requests:        0
Total transferred:      93600 bytes
HTML transferred:       13800 bytes
Requests per second:    149.67 [#/sec] (mean)
Time per request:       133.628 [ms] (mean)
Time per request:       6.681 [ms] (mean, across all concurrent requests)
Transfer rate:          22.80 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       4
Processing:    19  104  74.0     82     912
Waiting:       12   99  69.2     80     895
Total:         20  105  74.0     82     912

Percentage of the requests served within a certain time (ms)
50%     82
66%    116
75%    136
80%    159
90%    202
95%    243
98%    290
99%    291
100%    912 (longest request)
(base) fuzhengwei1@ZBMac-GV47H1GXD ~ % 

### 2. 无索引更新

### 3. 有索引更新


Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.9      0       8
Processing:    23  164  96.0    139     664
Waiting:       23  161  94.4    137     664
Total:         23  164  96.5    139     669

Percentage of the requests served within a certain time (ms)
50%    139
66%    175
75%    196
80%    211
90%    308
95%    374
98%    448
99%    459
100%    669 (longest request)

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.7      0       6
Processing:     5  163 119.8    125     934
Waiting:        5  154 111.9    119     807
Total:          5  163 119.8    126     937

Percentage of the requests served within a certain time (ms)
50%    126
66%    162
75%    225
80%    248
90%    367
95%    428
98%    471
99%    502
100%    937 (longest request)


服务器软件:
服务器主机名:127.0.0.1
服务器端口:8091

文档路径:/api/mysql/selectByOrderId
文档长度:23字节

并发级别:100
测试所用时间:3.395秒
完成请求:2000
失败请求:0
总传输量:312000字节
HTML传输量:46000字节
每秒请求数:589.09 [#/sec](平均值)
每个请求的时间:169.752 [ms](平均值)
每个请求的时间:1.698 [ms](平均值,所有并发请求)
传输速率:89.74 [Kbytes/sec](接收)

连接时间(毫秒)
最小值 平均值[+/-标准差] 中位数 最大值
连接:0 0 0.9 0 8
处理:23 164 96.0 139 664
等待:23 161 94.4 137 664
总计:23 164 96.5 139 669

在特定时间内完成请求的百分比(毫秒)
50% 139
66% 175
75% 196
80% 211
90% 308
95% 374
98% 448
99% 459
100% 669(最长请求)

解释:
- 服务器软件:指的是在服务器上运行的软件,用于提供服务和处理请求。
- 服务器主机名:指的是服务器的主机名或IP地址。
- 服务器端口:指的是服务器监听的端口号。
- 文档路径:指的是请求的文档路径。
- 文档长度:指的是请求的文档的长度,以字节为单位。
- 并发级别:指的是同时处理的请求数量。
- 完成请求:指的是成功完成的请求数量。
- 失败请求:指的是失败的请求数量。
- 总传输量:指的是总共传输的数据量,以字节为单位。
- HTML传输量:指的是传输的HTML数据量,以字节为单位。
- 每秒请求数:指的是每秒处理的请求数量,也称为QPS(Queries Per Second)。
- 每个请求的时间:指的是每个请求的平均处理时间,以毫秒为单位。
- 传输速率:指的是接收数据的速率,以千字节/秒为单位。
- 连接时间:指的是建立连接所花费的时间。
- 处理时间:指的是处理请求所花费的时间。
- 等待时间:指的是在处理请求期间等待的时间。
- 百分比的请求时间:指的是在特定时间内完成请求的百分比。例如,50%的请求在139毫秒内完成,99%的请求在459毫秒内完成。

===连接数 25 个

Server Software:        
Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/selectByOrderId
Document Length:        23 bytes

Concurrency Level:      100
Time taken for tests:   2.889 seconds
Complete requests:      2000
Failed requests:        0
Total transferred:      312000 bytes
HTML transferred:       46000 bytes
Requests per second:    692.24 [#/sec] (mean)
Time per request:       144.458 [ms] (mean)
Time per request:       1.445 [ms] (mean, across all concurrent requests)
Transfer rate:          105.46 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.7      0       4
Processing:     4  138  89.9    111     495
Waiting:        3  130  88.1     99     495
Total:          4  139  90.1    111     498

Percentage of the requests served within a certain time (ms)
50%    111
66%    159
75%    206
80%    225
90%    274
95%    309
98%    342
99%    378
100%    498 (longest request)


===== 连接数 5

Server Hostname:        127.0.0.1
Server Port:            8091

Document Path:          /api/mysql/selectByOrderId
Document Length:        23 bytes

Concurrency Level:      100
Time taken for tests:   3.086 seconds
Complete requests:      2000
Failed requests:        0
Total transferred:      312000 bytes
HTML transferred:       46000 bytes
Requests per second:    648.10 [#/sec] (mean)
Time per request:       154.296 [ms] (mean)
Time per request:       1.543 [ms] (mean, across all concurrent requests)
Transfer rate:          98.73 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0    0   0.9      0      10
Processing:     5  149 101.4    121     555
Waiting:        4  139  89.9    116     469
Total:          5  149 101.5    122     555

Percentage of the requests served within a certain time (ms)
50%    122
66%    168
75%    201
80%    220
90%    267
95%    398
98%    436
99%    454
100%    555 (longest request)