Curltimes
curl based TLS connection measurement tool for testing and comparing TLSv1.2 vs TLSv1.3 connections
Install / Use
/learn @centminmod/CurltimesREADME
curltimes.sh
curl measurement tool for HTTPS connection times using shell script modified from https://nooshu.github.io/blog/2020/07/30/measuring-tls-13-ipv4-ipv6-performance/
- Usage
- Examples
- Process Metrics
- TLS 1.2 vs TLS 1.3 diff compare
- curl HTTP/3 support
- Compare curl HTTP/3 over QUIC vs HTTP/2 over TLSv1.3
- Compare Mode
- curl resolve mode
- Environment Variables
Usage
./curltimes.sh
Usage:
TLS 1.2 max tests
./curltimes.sh json https://domain.com
./curltimes.sh csv https://domain.com
TLS 1.3 max tests
./curltimes.sh json-max https://domain.com
./curltimes.sh csv-max https://domain.com
CSV Summary
./curltimes.sh csv-sum https://domain.com
./curltimes.sh csv-max-sum https://domain.com
TLSv1.2 vs TLSv1.3 Compare
./curltimes.sh compare https://domain.com
Examples
json output with TLS 1.2 max
./curltimes.sh json https://servermanager.guide
curl 7.72.0-DEV
TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::ac43:26be) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
DNS,Connect,SSL,Wait,TTFB,Total Time
{
"time_dns": 0.015699,
"time_connect": 0.024545,
"time_appconnect": 0.062394,
"time_pretransfer": 0.062475,
"time_ttfb": 0.094291,
"time_total": 0.103574
}{
"time_dns": 0.002299,
"time_connect": 0.013313,
"time_appconnect": 0.045032,
"time_pretransfer": 0.045112,
"time_ttfb": 0.069348,
"time_total": 0.080474
}{
"time_dns": 0.017739,
"time_connect": 0.026433,
"time_appconnect": 0.053973,
"time_pretransfer": 0.054058,
"time_ttfb": 0.083686,
"time_total": 0.093763
}
json output with TLS 1.3 max
./curltimes.sh json-max https://servermanager.guide
curl 7.72.0-DEV
TLSv1.3 TLS_AES_128_GCM_SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::6816:42fa) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
DNS,Connect,SSL,Wait,TTFB,Total Time
{
"time_dns": 0.002447,
"time_connect": 0.011198,
"time_appconnect": 0.027511,
"time_pretransfer": 0.027593,
"time_ttfb": 0.064391,
"time_total": 0.073440
}{
"time_dns": 0.002405,
"time_connect": 0.013513,
"time_appconnect": 0.033980,
"time_pretransfer": 0.034065,
"time_ttfb": 0.073271,
"time_total": 0.084364
}{
"time_dns": 0.002346,
"time_connect": 0.011054,
"time_appconnect": 0.030559,
"time_pretransfer": 0.030656,
"time_ttfb": 0.084737,
"time_total": 0.093304
}
csv output with TLS 1.2 max
./curltimes.sh csv https://servermanager.guide
curl 7.72.0-DEV
TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::ac43:26be) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
DNS,Connect,SSL,Wait,TTFB,Total Time
0.002464,0.013496,0.045009,0.045091,0.078059,0.089155
0.002349,0.010987,0.038559,0.038653,0.080786,0.089689
0.002411,0.013445,0.044758,0.04484,0.07613,0.087181
csv output with TLS 1.3 max
./curltimes.sh csv-max https://servermanager.guide
curl 7.72.0-DEV
TLSv1.3 TLS_AES_128_GCM_SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::ac43:26be) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
DNS,Connect,SSL,Wait,TTFB,Total Time
0.002368,0.011004,0.032605,0.032687,0.069083,0.078063
0.002417,0.011137,0.029379,0.029465,0.071944,0.081752
0.002351,0.013413,0.034949,0.03503,0.073061,0.084205
process metrics
Using datamash to provide summary metrics for all recorded data points
csv-sum output with TLS 1.2 max
./curltimes.sh csv-sum https://servermanager.guide
curl 7.72.0-DEV
TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::6816:42fa) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
0.015257,0.023983,0.049285,0.049374,0.071656,0.080435
0.002349,0.01104,0.036542,0.036626,0.062205,0.07452
0.002402,0.011086,0.037044,0.037124,0.0672,0.078116
time_dns
avg: 0.006669
median: 0.002402
min: 0.002349
max: 0.015257
75%: 0.008830
95%: 0.013972
99%: 0.015000
time_connect
avg: 0.015370
median: 0.011086
min: 0.011040
max: 0.023983
75%: 0.017535
95%: 0.022693
99%: 0.023725
time_appconnect
avg: 0.040957
median: 0.037044
min: 0.036542
max: 0.049285
75%: 0.043165
95%: 0.048061
99%: 0.049040
time_pretransfer
avg: 0.041041
median: 0.037124
min: 0.036626
max: 0.049374
75%: 0.043249
95%: 0.048149
99%: 0.049129
time_ttfb
avg: 0.067020
median: 0.067200
min: 0.062205
max: 0.071656
75%: 0.069428
95%: 0.071210
99%: 0.071567
time_total
avg: 0.077690
median: 0.078116
min: 0.074520
max: 0.080435
75%: 0.079275
95%: 0.080203
99%: 0.080389
time_dns
avg:,median:,min:,max:,75%:,95%:,99%:
0.006669,0.002402,0.002349,0.015257,0.008830,0.013972,0.015000
time_connect
avg:,median:,min:,max:,75%:,95%:,99%:
0.015370,0.011086,0.011040,0.023983,0.017535,0.022693,0.023725
time_appconnect
avg:,median:,min:,max:,75%:,95%:,99%:
0.040957,0.037044,0.036542,0.049285,0.043165,0.048061,0.049040
time_pretransfer
avg:,median:,min:,max:,75%:,95%:,99%:
0.041041,0.037124,0.036626,0.049374,0.043249,0.048149,0.049129
time_ttfb
avg:,median:,min:,max:,75%:,95%:,99%:
0.067020,0.067200,0.062205,0.071656,0.069428,0.071210,0.071567
time_total
avg:,median:,min:,max:,75%:,95%:,99%:
0.077690,0.078116,0.074520,0.080435,0.079275,0.080203,0.080389
csv-max-sum output with TLS 1.3 max
./curltimes.sh csv-max-sum https://servermanager.guide
curl 7.72.0-DEV
TLSv1.3 TLS_AES_128_GCM_SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::6816:43fa) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
0.002545,0.011174,0.029505,0.029594,0.055961,0.06396
0.002442,0.01114,0.036338,0.036424,0.068599,0.077132
0.002426,0.011046,0.027465,0.027547,0.060354,0.067771
time_dns
avg: 0.002471
median: 0.002442
min: 0.002426
max: 0.002545
75%: 0.002493
95%: 0.002535
99%: 0.002543
time_connect
avg: 0.011120
median: 0.011140
min: 0.011046
max: 0.011174
75%: 0.011157
95%: 0.011171
99%: 0.011173
time_appconnect
avg: 0.031103
median: 0.029505
min: 0.027465
max: 0.036338
75%: 0.032921
95%: 0.035655
99%: 0.036201
time_pretransfer
avg: 0.031188
median: 0.029594
min: 0.027547
max: 0.036424
75%: 0.033009
95%: 0.035741
99%: 0.036287
time_ttfb
avg: 0.061638
median: 0.060354
min: 0.055961
max: 0.068599
75%: 0.064476
95%: 0.067775
99%: 0.068434
time_total
avg: 0.069621
median: 0.067771
min: 0.063960
max: 0.077132
75%: 0.072451
95%: 0.076196
99%: 0.076945
time_dns
avg:,median:,min:,max:,75%:,95%:,99%:
0.002471,0.002442,0.002426,0.002545,0.002493,0.002535,0.002543
time_connect
avg:,median:,min:,max:,75%:,95%:,99%:
0.011120,0.011140,0.011046,0.011174,0.011157,0.011171,0.011173
time_appconnect
avg:,median:,min:,max:,75%:,95%:,99%:
0.031103,0.029505,0.027465,0.036338,0.032921,0.035655,0.036201
time_pretransfer
avg:,median:,min:,max:,75%:,95%:,99%:
0.031188,0.029594,0.027547,0.036424,0.033009,0.035741,0.036287
time_ttfb
avg:,median:,min:,max:,75%:,95%:,99%:
0.061638,0.060354,0.055961,0.068599,0.064476,0.067775,0.068434
time_total
avg:,median:,min:,max:,75%:,95%:,99%:
0.069621,0.067771,0.063960,0.077132,0.072451,0.076196,0.076945
TLS 1.2 vs TLS 1.3 diff compare
domain=servermanager.guide
time diff -u <(./curltimes.sh csv-sum https://$domain) <(./curltimes.sh csv-max-sum https://$domain)
domain=servermanager.guide
time diff -u <(./curltimes.sh csv-sum https://$domain) <(./curltimes.sh csv-max-sum https://$domain)
--- /dev/fd/63 2020-08-03 11:40:44.747487856 +0000
+++ /dev/fd/62 2020-08-03 11:40:44.747487856 +0000
@@ -1,77 +1,77 @@
curl 7.72.0-DEV
-TLSv1.2 ECDHE-ECDSA-AES128-GCM-SHA256
+TLSv1.3 TLS_AES_128_GCM_SHA256
HTTP/2
Connected to servermanager.guide (2606:4700:10::6816:43fa) port 443 (#0)
Cloudflare proxied https://servermanager.guide
Sample Size: 3
-0.002346,0.01103,0.035427,0.035503,0.060286,0.069271
-0.002479,0.011148,0.037028,0.0371,0.079237,0.088524
-0.002359,0.010994,0.03724,0.037317,0.068266,0.085086
+0.002381,0.011015,0.031037,0.031123,0.054617,0.063293
+0.002451,0.011154,0.030285,0.030374,0.058021,0.066109
+0.002392,0.011041,0.027912,0.027996,0.05965,0.067558
time_dns
- avg: 0.002395
- median: 0.002359
- min: 0.002346
- max: 0.002479
- 75%: 0.002419
- 95%: 0.002467
- 99%: 0.002477
+ avg: 0.002408
+ median: 0.002392
+ min: 0.002381
+ max: 0.002451
+ 75%: 0.002422
+ 95%: 0.002445
+ 99%: 0.002450
t
