expo qa 2016
TRANSCRIPT
![Page 1: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/1.jpg)
Performance is Happiness
![Page 2: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/2.jpg)
import randomimport timeimport requests
class Speaker(object):
def __init__(self): born = "Avilés - Asturias" studies = "Applied Maths and Computability" jobdescription = "Performance Jedi" company = "Telefónica I+D" team = "Product Engineering" project = "AWAZZA" talks = [VLC Testing, DevopsDays, WebPerfDays, Velocity]
def talk(self): start_timer = time.time() r = requests.get('http://www.slideshare.net/almudenavivanco') r.raw.read() latency = time.time() - start_timer self.custom_timers[‘ExpoQA’'] = latency
if __name__ == '__main__': speech = Speaker() speech.talk() print trans.custom_timers
Almudena Vivanco (@MrsDaehin)
![Page 3: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/3.jpg)
Performance Team
![Page 4: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/4.jpg)
• User Satisfaction• What to Measure• How to Measure• What to Monitor
What are we going to focus on?
![Page 5: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/5.jpg)
![Page 6: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/6.jpg)
Fear the Latency
![Page 7: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/7.jpg)
Fear the Latency
![Page 8: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/8.jpg)
Fear is the path to the dark side. Fear leads to Inertia. Inertia Leads to paralysis. Paralysis leads to going out of Business.
![Page 9: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/9.jpg)
Let’s Aim for Speed
![Page 10: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/10.jpg)
![Page 11: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/11.jpg)
What shall we Measure?
![Page 12: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/12.jpg)
![Page 13: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/13.jpg)
![Page 14: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/14.jpg)
Vista WaterfallUna vez ejecutado veremos
Sin Cache de BrowserCon Cache de Browser
Golden Performance Rules
![Page 15: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/15.jpg)
Time is Relative
![Page 16: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/16.jpg)
Analytical Review ParametersLocalizaciónBrowserVelocidad de ConexiónNúmero de test a ejecutar ( coger un número Impar ;) )First View and Repeat View ( Cache!!! )Document Complete vs OnLoadIgnorar Errores SSL Capturar tcpdumpUser Agent ad HocCustom Headers
What shall we Measure?
![Page 17: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/17.jpg)
Size?
![Page 18: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/18.jpg)
What shall we Measure?
![Page 19: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/19.jpg)
Number of Requests?
![Page 20: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/20.jpg)
![Page 21: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/21.jpg)
Number of Domains?
![Page 22: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/22.jpg)
SPOF y BlockLa opción de Block nos simula un error tipo 404 mientras que si usamos el SPOF nos simula un timeout.
Por ejemplo podemos comprobar con Block la diferencia entre el tiempo de carga con y sin anuncios ( bloqueando
anuncios o trackers ;) )
En cambio cuando probamos el Single Point of Failure lo que queremos comprobar es que nuestro site es resilient a
3rd parties como por ejemplo los trackers, cómo se comporta nuestro site si el acceso a google analytics es lento o
realmente no hay servicio.
![Page 23: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/23.jpg)
![Page 24: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/24.jpg)
“My Mean time is fine."
![Page 25: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/25.jpg)
Apdex Index
t = acceptable response timesatisfied = response time < t
tolerating = t < response time > 4tfrustrated = response time > 4t
Apdex [t] = (satisfied + tolerating/2)/total requests
![Page 26: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/26.jpg)
Afterwards … in PROD ...
![Page 27: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/27.jpg)
Time To FIRST BYTE
![Page 28: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/28.jpg)
![Page 29: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/29.jpg)
![Page 30: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/30.jpg)
Waterfall Detalles
![Page 31: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/31.jpg)
Cómo analizar el waterfallCuántos Kb tiene el html inicialEn qué segundo comienza el evento render
Cuántos socket connections hay hacia un host en concreto
Cuántas redireccionesEn qué momento hay un socket abierto contra un recurso y por qué
![Page 32: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/32.jpg)
Custom Metrics[iframe-count]return document.getElementsByTagName("iframe").length;
[script-tag-count]return document.getElementsByTagName("script").length;
[meta-viewport]var viewport = undefined;var metaTags=document.getElementsByTagName("meta");for (var i = 0; i < metaTags.length; i++) { if (metaTags[i].getAttribute("name") == "viewport") { viewport = metaTags[i].getAttribute("content"); break; }}return viewport
NO se pueden añadir operaciones asincronas :( Timers, Ajax requests etc ...
![Page 33: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/33.jpg)
PerformanceIt's not just about adding more
servers
![Page 34: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/34.jpg)
![Page 35: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/35.jpg)
REAL USER MONITORING
Bring Up RUM*
real user monitoring
![Page 36: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/36.jpg)
![Page 37: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/37.jpg)
Real User Monitoring
![Page 38: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/38.jpg)
![Page 39: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/39.jpg)
![Page 40: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/40.jpg)
THINK BIG
![Page 41: Expo qa 2016](https://reader036.vdocuments.pub/reader036/viewer/2022062523/587c58481a28abc62c8b75e7/html5/thumbnails/41.jpg)