Meetup TestingUY 2016 - Performance durante y después - Federico Toledo
-
Upload
federico-toledo -
Category
Software
-
view
107 -
download
2
Transcript of Meetup TestingUY 2016 - Performance durante y después - Federico Toledo
![Page 1: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/1.jpg)
Performance Testing Durante y Después
PhD. Federico Toledo@fltoledo
![Page 2: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/2.jpg)
¿Cómo evitar este trabajo?
• Bomberos solucionando problemas en producción.
![Page 3: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/3.jpg)
• Introducción• Performance, testing, distintos enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
Agenda
![Page 4: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/4.jpg)
Agenda
• Introducción• Performance, testing, distintos enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 5: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/5.jpg)
¿Qué es performance
?
![Page 6: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/6.jpg)
TRABAJO ÚTIL
TIEMPO & RECURSOS
VS
![Page 7: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/7.jpg)
¿Qué es performanc
e testing?
![Page 8: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/8.jpg)
Simular
Sour
ce: h
ttp://
www.
min
iatu
r-wun
derla
nd.d
e/
![Page 9: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/9.jpg)
Medir
![Page 10: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/10.jpg)
Bottlenecks Punto de Quiebre
![Page 11: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/11.jpg)
• Usuarios concurrentes • Proceso
Tipos de Pruebas de Performance
![Page 12: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/12.jpg)
• Durante• Agile• Continuous integration • Unit, component• Feedback temprano• Ingeniería de Performance
• Después • Waterfall• Acceptance testing• Simulación de escenario de carga
Performance testing…
![Page 13: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/13.jpg)
Agenda
• Introducción• Performance, testing, distintos enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 14: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/14.jpg)
Agenda
• Introducción• Performance, testing, diferentes enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 15: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/15.jpg)
A tener siempre en cuenta
![Page 16: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/16.jpg)
• Scripting y programación
• Protocolos de comunicación
• Arquitecturas
• Herramientas de monitorización y métricas
• Administración de Redes y Sistemas Operativos
• Conocimiento del negocio y sus riesgos
Personas: hard-skills
![Page 17: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/17.jpg)
• Abstracción
• Comunicación
• Análisis
• Percepción
Personas: soft-skills
![Page 18: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/18.jpg)
Como dice Scott Barber:
A good performance tester should be a “mid-level” in everything.
http://www.perftestplus.com/resources/pt_for_managers_ppt.pdf
Personas
![Page 19: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/19.jpg)
A tener siempre en cuenta
![Page 20: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/20.jpg)
Tecnología
![Page 21: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/21.jpg)
• Simulación • JMeter (jmeter.apache.org)• Taurus (gettaurus.org)• BlazeMeter (blazemeter.com)• Gatling (gatling.io)
• Medición • Profilers y similar (JVisualVM, JProfiler,
dotTrace)• Herramientas a nivel de Sistema Operativo
(NMON, perfmon, Netdata)• APMs (AppDynamics, NewRelic, DataDog)
Tecnología – Server Side
![Page 22: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/22.jpg)
Tecnología
![Page 23: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/23.jpg)
• Web• Page Speed• Yslow• monkeytest.it• APMs
• Desktop• Perfmon o NMON • Profilers Java o .NET
• Mobile• Google Test Cloud / Testdroid / Perfecto• Xcode - Instruments / XCTest• APMs• Monkop
Tecnología – Client Side
![Page 24: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/24.jpg)
![Page 25: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/25.jpg)
![Page 26: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/26.jpg)
![Page 27: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/27.jpg)
Encuentro GeneXus Marca Fotocasa La Liga VivaVideo
Monkop - Exploraciones
![Page 28: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/28.jpg)
https://results.monkop.com/d8af6f27-7b0e-4573-b806-8303946269e3/report/report/index.html
![Page 29: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/29.jpg)
![Page 30: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/30.jpg)
![Page 31: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/31.jpg)
A tener siempre en cuenta
![Page 32: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/32.jpg)
• Diseño de prueba
• Automatización
• Ejecución y medición
Proceso / metodología
![Page 33: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/33.jpg)
• Plan de ejecución• Baseline (sin concurrencia)
• Para tener de referencia• Iterativo e incremental
• Problemas más graves se hacen visible primero
Proceso / metodología
Server
Server
![Page 34: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/34.jpg)
¿Cómo analizar problemas de performance?• Encontrar forma de reproducir• Asegurarse que el problema no es la prueba• Hacer un cambio a la vez• Changelog / bitácora para tener trazabilidad entre
cambios y cómo afectó
Tuning / ajuste
Bajan tiempos de respuesta x%
Cambio en una funcionalidad
Uso de CPU aumentó X%
Proceso / metodología
Icons by Gregor Črešnar, Jamie Wilson, Shmidt Sergey, Icon Fair. Source: https://thenounproject.com/
![Page 35: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/35.jpg)
• Los 5 ¿por qué? Para ir de síntomas a causas• El Sistema anda lento
• ¿Eso es síntoma o causa? ¿Por qué anda lento?• Porque el Sistema tarda 15 segundos en completar
• ¿Por qué?• Porque el componente de acceso a datos está
demorando todo ese tiempo • ¿Por qué?
• Porque hay SQL’s que tardan mucho • ¿Por qué?
• Porque en el entorno no se creó un índice fundamental en esas consultas • Entonces, ¡crear el índice!
Proceso / metodología
![Page 36: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/36.jpg)
Agenda
• Introducción• Performance, testing, diferentes enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 37: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/37.jpg)
Agenda
• Introducción• Performance, testing, diferentes enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 38: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/38.jpg)
• La mayoría de nuestros clientes nos piden por “simulación de carga” justo antes de salir en producción. • Principales motivaciones:
• Nueva versión con nuevas funcionalidades • Nueva arquitectura (win to web, web to mobile)• Campañas de Marketing• Un banco que absorbe a otro
• Solo algunos piden acompañarlos durante el desarrollo (en los últimos años)• Por eso decidimos comparar los dos enfoques
¿Qué es lo que se usa?
![Page 39: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/39.jpg)
PROS1.Más fácil de planificar2.Ambiente similar a producción3.Foco en un contexto específico
CONS4. Disponibilidad de la infraestructura5. Riesgo de altos costos por cambios
arquitectónicos
Performance Testing al Final
![Page 40: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/40.jpg)
PROS1. Minimizar riesgo2. Feedback temprano y constante
• Pruebas tempranas (unidades, componentes)• Integración continua
3. Aprendizaje continuo • Monitorización y análisis• Buenas y malas prácticas
CONS4. Mayor esfuerzo de automatización
• Prestar atención en qué nivel automatizamos5. Falacia de la Composición:
• Test(A)+Test(B)=Test(A+B)• Si se prueban los componentes entonces el
sistema integrado funcionará apropiadamente.
Performance Testing durante el desarrollo
![Page 41: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/41.jpg)
Agenda
• Introducción• Performance, testing, diferentes enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 42: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/42.jpg)
Agenda
• Introducción• Performance, testing, diferentes enfoques
• A tener siempre en cuenta• Personas, tecnología y metodología
• Comparación: Waterfall vs. Agile• Pros & Cons basado en experiencias reales
• Conclusiones
![Page 43: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/43.jpg)
¿Qué enfoque es mejor?
Deberíamos cambiar la pregunta…
Conclusiones
![Page 44: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/44.jpg)
• ¿Necesitas verificar que el sistema soporta determinada carga?• ¿Necesitas evidencia de prueba para tus
clientes? • ¿Querés analizar el impacto de un cambio en
producción?
SIMULACIÓN DE CARGAAl final
WATERFALL
¿Qué enfoque es mejor?
![Page 45: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/45.jpg)
• ¿Querés optimizar costo y reducir riesgos de performance?• ¿Querés incrementar el conocimiento del
equipo y mejorar las prácticas y habilidades? • ¿Querés incluir performance en tu integración continua?
INGENIERÍA DE PERFORMANCE Durante el desarrollo
AGILE
¿Qué enfoque es major?
![Page 46: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/46.jpg)
•Necesitamos los dos enfoques en distintos momentos.
• Comenzar temprano con ingeniería de performance y preparar una prueba de aceptación al final, justo antes de poner en producción.
¿Qué enfoque es mejor?
![Page 47: Meetup TestingUY 2016 - Performance durante y después - Federico Toledo](https://reader036.fdocuments.ec/reader036/viewer/2022070514/588204861a28abf05e8b5573/html5/thumbnails/47.jpg)
¡Gracias!
PhD. Federico Toledo@fltoledo
Performance Testing Durante y Después