Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

How JRebel for Android Does Performance Testing Madis Pink

Slide 3

Slide 3 text

JRebel for Android

Slide 4

Slide 4 text

(relatively) long-running tasks >500ms

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Is the app fast?

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Is the app fast enough?

Slide 9

Slide 9 text

Is this version faster than that version?

Slide 10

Slide 10 text

Is this version slower than that version?

Slide 11

Slide 11 text

Is this version slower than that version? Benchmarking!

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Added the foo feature to thingamajig, set foo=true in the debug settings to enable it. ...

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

Automation We need:

Slide 16

Slide 16 text

Automation We need: → A harness to run the tests

Slide 17

Slide 17 text

Automation We need: → A harness to run the tests → Pinpoint specific commits

Slide 18

Slide 18 text

Automation We need: → A harness to run the tests → Pinpoint specific commits → Make regressions noticeable

Slide 19

Slide 19 text

Consistent Results Detecting regressions quickly

Slide 20

Slide 20 text

8000ms -> 8800ms regression error: +/- 2000ms

Slide 21

Slide 21 text

8000ms -> 8800ms regression error: +/- 200ms

Slide 22

Slide 22 text

Consistent Results - Nexus 5

Slide 23

Slide 23 text

Consistent Results - Nexus 5

Slide 24

Slide 24 text

Thermal Throttling

Slide 25

Slide 25 text

Consistent Results - Emulator

Slide 26

Slide 26 text

Consistent Results - Emulator

Slide 27

Slide 27 text

Consistent Results - Emulator

Slide 28

Slide 28 text

Analyzing Results

Slide 29

Slide 29 text

Kibana (ELK)

Slide 30

Slide 30 text

Kibana (ELK) → Elasticsearch (stores)

Slide 31

Slide 31 text

Kibana (ELK) → Elasticsearch (stores) → Logstash (receives)

Slide 32

Slide 32 text

Kibana (ELK) → Elasticsearch (stores) → Logstash (receives) → Kibana (displays)

Slide 33

Slide 33 text

Logstash input { http { port => 1138 } } output { elasticsearch { hosts => ["localhost"] } }

Slide 34

Slide 34 text

Logstash $ curl -XPUT 'http://127.0.0.1:1138' \ -H "content-type: application/json" \ -d '{ "version": "1.3.2", "test": "someTest", "timeMillis": 503 }'

Slide 35

Slide 35 text

Logstash class PerfTestResult { String version; String test; long timeMillis; }

Slide 36

Slide 36 text

Logstash /** * Simple Retrofit REST endpoint that * can send test results to logstash */ interface LogstashReporter { @PUT("/") @Headers("Content-Type: application/json") Call reportResult(@Body PerfTestResult result); }

Slide 37

Slide 37 text

Kibana (demo)

Slide 38

Slide 38 text

github.com/madisp/ perftesting-sample

Slide 39

Slide 39 text

Kibana A few usecases

Slide 40

Slide 40 text

A few usecases

Slide 41

Slide 41 text

Testing specific flags

Slide 42

Slide 42 text

Detecting Regressions Early

Slide 43

Slide 43 text

Fix verification

Slide 44

Slide 44 text

Improvements in Infrastructure :)

Slide 45

Slide 45 text

Long-Term Historical Data

Slide 46

Slide 46 text

Long-Term Historical Data

Slide 47

Slide 47 text

Long-Term Historical Data

Slide 48

Slide 48 text

Long-Term Historical Data

Slide 49

Slide 49 text

Long-Term Historical Data

Slide 50

Slide 50 text

Long-Term Historical Data

Slide 51

Slide 51 text

Long-Term Historical Data

Slide 52

Slide 52 text

//TODO

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

? @madisp speakerdeck.com/madisp

Slide 55

Slide 55 text

Images Used

Slide 56

Slide 56 text

Images Used → SMBC, The superhero we need, http://smbc-comics.com/comic/ the-superhero-we-need

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

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/

Slide 59

Slide 59 text

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/

Slide 60

Slide 60 text

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

Slide 61

Slide 61 text

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