Skip to content

Instantly share code, notes, and snippets.

@lmarburger
Forked from TimMoore/curl-bundler-api
Last active December 22, 2015 21:59
Show Gist options
  • Save lmarburger/6537333 to your computer and use it in GitHub Desktop.
Save lmarburger/6537333 to your computer and use it in GitHub Desktop.
Timing rubygems spec.4.8 download from Fastly and S3. Run the test script and paste your results in a comment below: `curl -s https://gist.github.com/lmarburger/6537333/raw/time.sh | bash`
$ curl -s https://gist.github.com/lmarburger/6537333/raw/time.sh | bash
== Fastly ==
DNS: 0.156 CONNECT: 0.189 REQSENT: 0.488 STARTTX: 2.860 TOTAL: 5.583
X-Served-By: cache-v43-ASH, cache-ny58-NYC
X-Cache: MISS, MISS
DNS: 0.001 CONNECT: 0.040 REQSENT: 0.129 STARTTX: 0.174 TOTAL: 1.321
X-Served-By: cache-v43-ASH, cache-ny57-NYC
X-Cache: MISS, HIT
DNS: 0.002 CONNECT: 0.031 REQSENT: 0.123 STARTTX: 0.166 TOTAL: 1.237
X-Served-By: cache-v43-ASH, cache-ny57-NYC
X-Cache: MISS, HIT
DNS: 0.001 CONNECT: 0.043 REQSENT: 0.134 STARTTX: 0.171 TOTAL: 1.361
X-Served-By: cache-v43-ASH, cache-ny57-NYC
X-Cache: MISS, HIT
DNS: 0.002 CONNECT: 0.034 REQSENT: 0.116 STARTTX: 0.156 TOTAL: 1.324
X-Served-By: cache-v43-ASH, cache-ny58-NYC
X-Cache: MISS, HIT
DNS: 0.002 CONNECT: 0.037 REQSENT: 0.125 STARTTX: 0.171 TOTAL: 1.379
X-Served-By: cache-v43-ASH, cache-ny56-NYC
X-Cache: MISS, HIT
DNS: 0.001 CONNECT: 0.041 REQSENT: 0.129 STARTTX: 0.166 TOTAL: 1.292
X-Served-By: cache-v43-ASH, cache-ny58-NYC
X-Cache: MISS, HIT
DNS: 0.002 CONNECT: 0.031 REQSENT: 0.121 STARTTX: 0.156 TOTAL: 1.314
X-Served-By: cache-v43-ASH, cache-ny56-NYC
X-Cache: MISS, HIT
DNS: 0.001 CONNECT: 0.035 REQSENT: 0.132 STARTTX: 0.169 TOTAL: 1.261
X-Served-By: cache-v43-ASH, cache-ny56-NYC
X-Cache: MISS, HIT
DNS: 0.002 CONNECT: 0.049 REQSENT: 0.137 STARTTX: 0.172 TOTAL: 1.261
X-Served-By: cache-v43-ASH, cache-ny56-NYC
X-Cache: MISS, HIT
== Rubygems ==
DNS: 0.390 CONNECT: 0.423 REQSENT: 0.512 STARTTX: 0.950 TOTAL: 3.302
DNS: 0.001 CONNECT: 0.040 REQSENT: 0.127 STARTTX: 0.626 TOTAL: 2.522
DNS: 0.001 CONNECT: 0.036 REQSENT: 0.125 STARTTX: 0.611 TOTAL: 2.580
DNS: 0.001 CONNECT: 0.037 REQSENT: 0.126 STARTTX: 0.658 TOTAL: 2.451
DNS: 0.001 CONNECT: 0.037 REQSENT: 0.126 STARTTX: 0.601 TOTAL: 2.509
DNS: 0.001 CONNECT: 0.039 REQSENT: 0.127 STARTTX: 0.620 TOTAL: 2.845
DNS: 0.001 CONNECT: 0.037 REQSENT: 0.159 STARTTX: 0.589 TOTAL: 2.418
DNS: 0.001 CONNECT: 0.039 REQSENT: 0.382 STARTTX: 1.032 TOTAL: 4.515
DNS: 0.001 CONNECT: 0.041 REQSENT: 0.129 STARTTX: 0.657 TOTAL: 3.010
DNS: 0.001 CONNECT: 0.044 REQSENT: 0.135 STARTTX: 0.643 TOTAL: 3.255
#!/usr/bin/env bash
echo '== Fastly =='
for i in {1..10}; do
echo
curl -isSD >(grep "X-\(Cache\|Served-By\):") -o /dev/null \
-w "DNS: %{time_namelookup} CONNECT: %{time_connect} REQSENT: %{time_pretransfer} STARTTX: %{time_starttransfer} TOTAL: %{time_total}\n" \
https://bundler.global.ssl.fastly.net/specs.4.8.gz
done
echo
echo
echo '== Rubygems =='
for i in {1..10}; do
curl -LisS -o /dev/null \
-w "DNS: %{time_namelookup} CONNECT: %{time_connect} REQSENT: %{time_pretransfer} STARTTX: %{time_starttransfer} TOTAL: %{time_total}\n" \
https://www.rubygems.org/specs.4.8.gz
done
@lmarburger
Copy link
Author

Posting @charliesome's results here for completeness.

== Fastly ==

DNS:  0.696 CONNECT:  0.743 REQSENT: 0.870 STARTTX:  5.527 TOTAL:  6.908
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, MISS

DNS:  0.001 CONNECT:  0.047 REQSENT: 0.164 STARTTX:  0.222 TOTAL:  1.570
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.048 REQSENT: 0.167 STARTTX:  0.225 TOTAL:  1.661
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.046 REQSENT: 0.184 STARTTX:  0.253 TOTAL:  1.622
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.047 REQSENT: 0.166 STARTTX:  0.224 TOTAL:  1.594
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.047 REQSENT: 0.196 STARTTX:  0.254 TOTAL:  1.612
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.061 REQSENT: 0.177 STARTTX:  0.233 TOTAL:  1.578
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.047 REQSENT: 0.170 STARTTX:  0.227 TOTAL:  1.641
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.050 REQSENT: 0.168 STARTTX:  0.227 TOTAL:  1.598
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.048 REQSENT: 0.167 STARTTX:  0.224 TOTAL:  1.578
X-Served-By: cache-v41-ASH, cache-sy65-AU
X-Cache: MISS, HIT


== Rubygems ==
DNS:  0.429 CONNECT:  0.711 REQSENT: 2.960 STARTTX:  3.677 TOTAL:  12.109
DNS:  0.001 CONNECT:  0.283 REQSENT: 1.079 STARTTX:  2.002 TOTAL:  9.457
DNS:  0.001 CONNECT:  0.255 REQSENT: 0.922 STARTTX:  1.562 TOTAL:  8.535
DNS:  0.000 CONNECT:  0.285 REQSENT: 0.921 STARTTX:  1.639 TOTAL:  9.565
DNS:  0.383 CONNECT:  0.668 REQSENT: 1.255 STARTTX:  1.959 TOTAL:  9.495
DNS:  0.000 CONNECT:  0.274 REQSENT: 0.837 STARTTX:  1.402 TOTAL:  8.007
DNS:  0.000 CONNECT:  0.284 REQSENT: 0.898 STARTTX:  1.634 TOTAL:  9.226
DNS:  0.001 CONNECT:  0.255 REQSENT: 0.777 STARTTX:  1.433 TOTAL:  8.210
DNS:  0.001 CONNECT:  0.306 REQSENT: 0.921 STARTTX:  1.639 TOTAL:  10.868
DNS:  0.519 CONNECT:  0.815 REQSENT: 1.437 STARTTX:  2.083 TOTAL:  8.743

@lmarburger
Copy link
Author

Posting @spastorino's results here for completeness.

== Fastly ==

DNS:  0.520 CONNECT:  0.695 REQSENT: 2.299 STARTTX:  4.560 TOTAL:  7.163
X-Served-By: cache-v44-ASH
X-Cache: MISS

DNS:  0.001 CONNECT:  0.184 REQSENT: 0.571 STARTTX:  2.878 TOTAL:  5.633
X-Served-By: cache-v36-ASH, cache-ny57-NYC
X-Cache: MISS, MISS

DNS:  0.001 CONNECT:  0.194 REQSENT: 0.593 STARTTX:  2.873 TOTAL:  5.785
X-Served-By: cache-v42-ASH
X-Cache: MISS

DNS:  0.338 CONNECT:  0.529 REQSENT: 0.924 STARTTX:  1.116 TOTAL:  3.980
X-Served-By: cache-v36-ASH, cache-ny58-NYC
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.173 REQSENT: 0.528 STARTTX:  0.699 TOTAL:  3.229
X-Served-By: cache-v36-ASH, cache-ny58-NYC
X-Cache: MISS, HIT

DNS:  0.001 CONNECT:  0.195 REQSENT: 0.596 STARTTX:  0.949 TOTAL:  3.683
X-Served-By: cache-v42-ASH, cache-ny56-NYC
X-Cache: HIT, MISS

DNS:  0.001 CONNECT:  0.170 REQSENT: 0.519 STARTTX:  0.694 TOTAL:  3.293
X-Served-By: cache-v42-ASH, cache-ny57-NYC
X-Cache: HIT, HIT

DNS:  0.001 CONNECT:  0.193 REQSENT: 0.591 STARTTX:  0.785 TOTAL:  3.678
X-Served-By: cache-v42-ASH, cache-ny56-NYC
X-Cache: HIT, HIT

DNS:  0.001 CONNECT:  0.169 REQSENT: 0.518 STARTTX:  0.687 TOTAL:  3.218
X-Served-By: cache-v42-ASH, cache-ny56-NYC
X-Cache: HIT, HIT

DNS:  1.168 CONNECT:  1.349 REQSENT: 1.724 STARTTX:  4.743 TOTAL:  7.576
X-Served-By: cache-v41-ASH, cache-at51-ATL
X-Cache: MISS, MISS


== Rubygems ==
DNS:  0.347 CONNECT:  0.537 REQSENT: 1.832 STARTTX:  2.541 TOTAL:  10.058
DNS:  0.001 CONNECT:  0.189 REQSENT: 0.577 STARTTX:  1.229 TOTAL:  7.240
DNS:  0.001 CONNECT:  0.184 REQSENT: 0.560 STARTTX:  1.127 TOTAL:  6.961
DNS:  0.001 CONNECT:  0.189 REQSENT: 0.579 STARTTX:  1.290 TOTAL:  6.955
DNS:  0.001 CONNECT:  0.184 REQSENT: 0.560 STARTTX:  1.056 TOTAL:  6.655
DNS:  0.001 CONNECT:  0.182 REQSENT: 0.556 STARTTX:  1.052 TOTAL:  6.324
DNS:  0.001 CONNECT:  0.184 REQSENT: 0.564 STARTTX:  1.100 TOTAL:  6.756
DNS:  0.001 CONNECT:  0.183 REQSENT: 0.559 STARTTX:  1.139 TOTAL:  6.501
DNS:  0.001 CONNECT:  0.190 REQSENT: 0.579 STARTTX:  1.157 TOTAL:  6.813
DNS:  0.001 CONNECT:  0.184 REQSENT: 0.561 STARTTX:  1.325 TOTAL:  7.290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment