window.addEventListener('load',function () { var t = window.performance.timing, metrics = []; metrics.push({name:'ttfb',value:t.responseStart - t.fetchStart}); metrics.push({name:'dom',value:t.loadEventStart - t.domLoading}); metrics.push({name:'load',value:t.loadEventStart - t.fetchStart}); var img = document.createElement('img'); img.src = 'http://mycollector/?' +metrics.map(function (m) { return m.name+'='+m.value}).join('&'); document.body.appendChild(img); });
Latence constante 60 ms, bande passante variable
Bande passante constante 5 Mbps, latence variable
Sur les 20 dernières années, la bande passante a évolué 1000 fois plus vite que la latence
c = 300,000 km/s
(dans le vide)
De l'ordre de 190 000 km/s dans une fibre optique
soit environ 5 ms par 1,000 km
POST /request HTTP/1.1 Host: localhost:9000 Accept: text/html, image/jpeg, */* User-Agent: Infiltrator Content-Type: application/json {"name":"Bauer","role":"Captain"}
{"name":"Bauer","role":"Captain"}
raphael$ ifconfig lo0 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 raphael$ ping localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.050 ms raphael$ iperf -s -p 8888 ... [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 43.6 GBytes 37.4 Gbits/sec
#DevoxxFR