Journée DevOps : Tests de performance en continu

  • Published on
    11-May-2015

  • View
    377

  • Download
    0

Embed Size (px)

DESCRIPTION

Vous n'avez pas pu assister la journe DevOps by Xebia ? Voici la prsentation de Guillaume Arnaud concernant les tests de performance en continu.

Transcript

  • 1.Tests de perf en continu Guillaume Arnaud @guillarnaud William Montaz @willymontaz

2. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Plan 2 contexte mthodologie outils Demo 3. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Anticiper 3 Multithreading dead lockisolationContention taille de poolsollicitation BDD Systme mmoirecpu DevOps dploiement continudimensionnement 4. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Loi de Little 4 L = . L = nombre de requtes = frquence = dure moyen des requtes 5. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Loi de Little 5 serveur dapplication 1 requte/sec 200 ms 5 requtes 6. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Que teste-t-on ? 6 test de perf != test de charge non exhaustif temps de rfrence reproductabilit 7. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Ecrire un scnario 7 dialogue simple un service = un job dbit xe contrle des rponses donnes dterministes 8. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Environnement technique 8 serveur dintgration continu serveur de monitoring serveur dapplication Diamond graphite dploie ordonne tire rcolte alimente alimente alimente rcolte 9. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Gatling 9 ! Domain Specific Language (DSL) intuitive sintgre bien avec Jenkins et Maven hype: scala, modle actor peut tre tendu 10. 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) )) 11. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Gatling 11 12. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Graphite 12 13. 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 14. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Grafana 14 15. 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 } ] } 16. EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC Diamond 16 17. 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() { @Override public Integer getValue() { return queue.size(); } }); } }