Upload
almudena-vivanco
View
339
Download
1
Embed Size (px)
Citation preview
Performance ModellingMatemáticas y sentido común
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[‘After Test 2016'] = latency
if __name__ == '__main__': speech = Speaker() speech.talk() print trans.custom_timers
Almudena Vivanco (@MrsDaehin)
Users vs request• ¿cuánto aguanta nuestra plataforma?
SCENARIOS: Identify the scenarios that are most commonly executed or most resource-intensive
WORKLOAD MODEL: User Session Duration in average. It is important to define the load levels that will translate into concurrent usage, overslapping users, or user sessions per second.
USER SCENARIO: Navigational Path, including intermediate steps or activities, taken by the user to complete a task. We will call it User Session from now on.
THINK TIMES: User thinktimes → Pause between pages during a User Session depending on the User Type*
User Types: Identify the User … new, revisiting or both.
Performance Acceptance Criteria: Response time, System load, Throughput ...
METRICS: Only well-selected metrics that are analyzed correctly and contextually provide information of value.
DESIGN TEST: Using your scenarios, key metrics, and workload analysis …
RUN TEST: the load simulation must reflect the test design
ANALYZE RESULTS: Find bottlenecks, memory leaks, cpu hogs, bad sofware design …
The Maths behind
“mi tiempo medio de respuesta está bien."
Afterwards … in PROD ...
PerformanceIt's not just about adding more
servers
Apdex Indext = acceptable response timesatisfied = response time < t
tolerating = t < response time > 4tfrustrated = response time > 4t
Apdex [t] = (satisfied + tolerating/2)/total requests
• Percentiles• Moda• Media• Mediana• Desviación Estándar
• https://msdn.microsoft.com/en-us/library/bb924370.aspx
Matemáticas y Sentido Común
http://www.raosoft.com/samplesize.html
Distribución de Poisson
Modelando el uso de la aplicación
Identificar el objetivo de la prueba• Volumen de tráfico?• Escala?• Picos de carga?• Robusto?
EstadísticasSesiónPáginas VistasFlujoDispositivoLocalizacion
Modelización y Jmeter
JMeter
Jmeter Test Plan
User Defined Variables
Functional Test Mode
User defined Variables at Test Plan level to be used from Jenkins
User Behaviour in JMeterOnly Once Controllers
Cache Management
Cookie Management
Header Manager
Think Times
Jmeter in Cloud commercial tools
Resources• http://www.raosoft.com/samplesize.html
• http://analyze.websiteoptimization.com/wso
• http://mobitest.akamai.com/m/index.cgi
• http://stevesouders.com/mobileperf/mobileperfbkm.php
• https://msdn.microsoft.com/en-us/library/bb924370.aspx
• http://www.quotium.com/performance/load-testing-calculating-pacing-time/