journée devops : tests de performance en continu
DESCRIPTION
Vous n'avez pas pu assister à la journée DevOps by Xebia ? Voici la présentation de Guillaume Arnaud concernant les tests de performance en continu.TRANSCRIPT
![Page 1: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/1.jpg)
Tests de perf en continu
Guillaume Arnaud @guillarnaud
William Montaz @willymontaz
![Page 2: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/2.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Plan
�2
contexte méthodologie
outils Demo
![Page 3: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/3.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Anticiper
�3
Multithreading dead lock isolation
Contention taille de pool sollicitation BDD
Système mémoire cpu
DevOps déploiement continu dimensionnement
![Page 4: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/4.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Loi de Little
�4
L = λ.𝝉
L = nombre de requêtes λ = fréquence 𝝉 = durée moyen des requêtes
![Page 5: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/5.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Loi de Little
�5
serveur d’application
1 requête/sec200 ms
5 requêtes
![Page 6: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/6.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Que teste-t-on ?
�6
test de perf != test de charge
non exhaustif
temps de référence
reproductabilité
![Page 7: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/7.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Ecrire un scénario
�7
dialogue simple
un service = un job
débit fixe
contrôle des réponses
données déterministes
![Page 8: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/8.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Environnement technique
�8
serveur d’intégration continu
serveur de monitoring
serveur d’application
Diamond
graphite
déploie
ordonnetire
récolte
alimente
alimente
alimente
récolte
![Page 9: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/9.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Gatling
�9
!
• Domain Specific Language (DSL) intuitive
• s’intègre bien avec Jenkins et Maven
• hype: scala, modèle actor
• peut être étendu
![Page 10: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/10.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Gatling: DSL
�10
val scn = scenario("My scenario") .exec(http("My Page") .get("http://mywebsite.com/page.html") .param("username", "bill") .check(status.is(200))) !setUp(scn.inject( constantRate(20 usersPerSec) during (15 seconds) ))
![Page 11: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/11.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Gatling
�11
![Page 12: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/12.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Graphite
�12
![Page 13: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/13.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Graphite
�13
wildcard target=server*.cpu
timeshift target=server1.cpu&from=-30min&until=-10min target=server1.cpu&target=timeShift(server1.cpu, "7d")
operations target=sumSeries(server*.cpu, "7d") target=derivative(gatling.hitcount)
format de sortie target=server1.cpu&format=json
graphique target=server*.cpu&bgcolor=blue&aeraMode=stacked
![Page 14: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/14.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Grafana
�14
![Page 15: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/15.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
JMXTrans
�15
{"servers" : [ { "port" : "8004", "host" : "mysys.mydomain", "queries" : [ { "outputWriters" : [ { "@class" : "com.g.j.m.output.GraphiteWriter", "settings" : {"port" : 2003,"host" : "myhost", "typeNames" : [ "name" ]} } ], "obj" : "Catalina:type=…,class=j.s.DataSource,name=*", "resultAlias": "datasources", "attr" : [ "numActive", "numIdle" ] } ], "numQueryThreads" : 2 } ] }
![Page 16: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/16.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Diamond
�16
![Page 17: Journée DevOps : Tests de performance en continu](https://reader033.vdocuments.fr/reader033/viewer/2022052822/554fb661b4c9057b298b5435/html5/thumbnails/17.jpg)
• EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Metrics
�17
public class QueueManager { private final Queue queue; ! public QueueManager(MetricRegistry metrics, String name) { this.queue = new Queue(); metrics.register(MetricRegistry.name(QueueManager.class, name, "size"), new Gauge<Integer>() { @Override public Integer getValue() { return queue.size(); } }); } }