Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How JRebel for Android does performance testing

Madis Pink
October 22, 2016

How JRebel for Android does performance testing

This talk was given at Mobilization 2016.

As developers we often employ unit- and integration testing to catch bugs early during development. But how to detect regressions in performance? Sometimes a small slowdown can go unnoticed for weeks or months until the app becomes unbearably slow and a profiler gets attached. In this talk, we'll take an in-the-trenches look at how we set up a performance testing suite for JRebel for Android. We'll talk about challenges we faced when running the tests on our CI servers. We'll also cover how we pinpoint regressions to a single commit with the help of Elasticsearch and Kibana.

Madis Pink

October 22, 2016
Tweet

More Decks by Madis Pink

Other Decks in Programming

Transcript

  1. Added the foo feature to thingamajig, set foo=true in the

    debug settings to enable it. ...oh, also made the app startup two seconds slower
  2. Automation We need: → A harness to run the tests

    → Pinpoint specific commits → Make regressions noticeable
  3. Logstash input { http { port => 1138 } }

    output { elasticsearch { hosts => ["localhost"] } }
  4. Logstash $ curl -XPUT 'http://127.0.0.1:1138' \ -H "content-type: application/json" \

    -d '{ "version": "1.3.2", "test": "someTest", "timeMillis": 503 }'
  5. Logstash /** * Simple Retrofit REST endpoint that * can

    send test results to logstash */ interface LogstashReporter { @PUT("/") @Headers("Content-Type: application/json") Call<ResponseBody> reportResult(@Body PerfTestResult result); }
  6. Images Used → SMBC, The superhero we need, http://smbc-comics.com/comic/ the-superhero-we-need

    → JRebel for Android logo, http://jrebelforandroid.com → PBF comics, beach, http://pbfcomics.com/259/
  7. Images Used → SMBC, The superhero we need, http://smbc-comics.com/comic/ the-superhero-we-need

    → JRebel for Android logo, http://jrebelforandroid.com → PBF comics, beach, http://pbfcomics.com/259/ → TF2 engineer wallpaper, http://frontierjustineer.tumblr.com/
  8. Images Used → SMBC, The superhero we need, http://smbc-comics.com/comic/ the-superhero-we-need

    → JRebel for Android logo, http://jrebelforandroid.com → PBF comics, beach, http://pbfcomics.com/259/ → TF2 engineer wallpaper, http://frontierjustineer.tumblr.com/ → Gunshow comic, This is fine, http://gunshowcomic.com/648
  9. Images Used → SMBC, The superhero we need, http://smbc-comics.com/comic/ the-superhero-we-need

    → JRebel for Android logo, http://jrebelforandroid.com → PBF comics, beach, http://pbfcomics.com/259/ → TF2 engineer wallpaper, http://frontierjustineer.tumblr.com/ → Gunshow comic, This is fine, http://gunshowcomic.com/648 → Random switches on eBay, http://www.ebay.com/itm/Pilot- Universal-3-Row-Chrome-Safety-Cover-Toggle-Switch-w-Red- Indicator-Light-/371614043104