SlideShare a Scribd company logo
1 of 19
Download to read offline
Ivano Malavolta - https://github.com/S2-group/android-runner
A Framework for the Automatic Execution of
Measurement-based Experiments on Android Devices
Ivano Malavolta, Eoin Grua, Cheng-Yu Lam, Randy de Vries, Franky Tan, Eric
Zielinski, Michael Peters, Luuk Kaandorp
Ivano Malavolta - https://github.com/S2-group/android-runner
Run-time measurement of Android apps is difficult
● It requires large boilerplate code
● Measurement tools must be carefully setup
● Various empirical best practices are scattered across the literature
● Experiments can take several hours of sheer execution time
● Existing experimental pipelines are
○ Ad-hoc for one specific experiment
○ Tailored to one specific quality attribute (e.g., energy efficiency)
→ Poor replicability + many research groups reinventing the wheel
Ivano Malavolta - https://github.com/S2-group/android-runner
Android Runner
A framework to automatically execute measurement-based
experiments on native and web apps
Android
Runner
Intuition - users define their experiment in a descriptive fashion, and then its
execution is fully automatic, customizable, and replicable
Practitioner
Researcher
Researcher
Conducting empirical studies on Android apps
Developing new run-time profilers for Android devices
Measuring the quality of their apps at run-time
Ivano Malavolta - https://github.com/S2-group/android-runner
Design drivers of Android Runner
Experiments executed without any interaction from the researcherAutomation
Incremental
experiments
Customizability
Usability
Profiler
independence
Experiments
replicability
Pause/resume mechanism
Experiments defined in a descriptive fashion
Possibility to add your own business logic or automated testing tool
Either hardware or software profilers, support for multiple profilers
in parallel
Possibility to easily execute an already-performed experiment
Ivano Malavolta - https://github.com/S2-group/android-runner
Overview of Android Runner
Ivano Malavolta - https://github.com/S2-group/android-runner
Experiment orchestrator - input
Experiment
configuration
Ivano Malavolta - https://github.com/S2-group/android-runner
Experiment orchestrator - tasks
1. Perform diagnostic checks
○ User input, e.g., all subjects’ APKs are present
○ Environment, e.g., check if external tools like ADB are properly configured
2. Setup the devices via the Devices manager
3. Bring up the profilers specified in the experiment configuration via the Plugin
handler
4. Setup the plan of the runs via the Progress manager
5. Execute the runs according to the sequence defined in the plan
6. Clean up the devices via the Devices manager
○ e.g., uninstall all subjects in case of native experiment
7. Aggregate the collected measures
Ivano Malavolta - https://github.com/S2-group/android-runner
External scripts
Optional Python scripts for executing custom behaviour at
specific points of the experiment
before_experiment Before the first run of the experiment
before_run Before every run of the experiment
after_launch After the current subject is launched, but before measurement starts
interaction During the measurement window (e.g., usage scenarios)
before_close Before the current subject is closed
after_run After every run completes
after_experiment After the last run of the experiment
Ivano Malavolta - https://github.com/S2-group/android-runner
Examples of uses of external scripts
● Replay previously recorded usage scenarios (interaction)
○ Python
○ Monkerunner JSON format
● Bring up a local web proxy for recording all traffic generated by the subjects
(before_experiment)
● Programmatically pass a login screen (interaction)
● Throttle the network connection to simulate slower/faster networks
Ivano Malavolta - https://github.com/S2-group/android-runner
Devices manager
Layer of abstraction on the low-level operations on the devices
● Diagnostic checks on the ADB connection to each device
● Programmatically enable/disable USB charging
● List/install/uninstall apps on the devices
● Launch/stop/force-terminate processes on the device
● Read/write files on the device
Devices
Ivano Malavolta - https://github.com/S2-group/android-runner
Progress manager
● Build the plan of all the runs of the experiment
● Shuffle the plan, if requested by the user
● Provide the plan to the orchestrator
● Persist the current status of the plan during the experiment
ID Subject Device RunIndex
run1 com.facebook.katana lg5x 1
run2 com.twitter.android lg5x 16
... ... ... ...
Ivano Malavolta - https://github.com/S2-group/android-runner
Plugin handler
● Profilers as third-party plug-ins
● Extension point for plugin developers exposing:
○ the Devices manager
○ the current subject being executed
○ ...
● Each plugin follows the same lifecycle
Ivano Malavolta - https://github.com/S2-group/android-runner
Available plugins
Di Nucci et al. Software-based energy
profiling of android apps: Simple,
efficient and reliable? SANER 2017.
Luis Cruz. Tools and Techniques for
Energy-Efficient Mobile Application
Development. PhD thesis, 2019.
Hecht et al. An empirical study of the
performance impacts of android
code smells. MOBILESoft 2016.
Ivano Malavolta - https://github.com/S2-group/android-runner
Outputs
●
○ Produced by the plugins
○ The format is plugin-dependent
■ Higher degree of freedom for plugin developers
■ Usually CSV files
■ The convention is to always save the measures in the file system → higher replicability
○ Based on the logcat Android tool
○ Contains all system messages during all runs
○ Allows future inspections of problematic/interesting runs
Measures
Logs
Ivano Malavolta - https://github.com/S2-group/android-runner
Generic benchmarking apps https://github.com/S2-group/
android-apps-benchmark
App Description
Baseline No functionality (idle)
Accelerometer Listens for accelerometer data
Ambient light sensor listens for changes in the ambient light sensor
Camera (x3) Takes a picture from the front camera every 15, 10, or 5 seconds
CPU (x3) Computes a large factorial number every 3, 2, or 1 seconds
Display Plays a video at full brightness
GPS (x3) Listens for location updates every 3, 2, or 1 seconds
Gravity sensor Listens for continuous updates of the gravity sensor
Gyroscope Listens for continuous updates of the gyroscope
Local storage (x3) Writes 1 MB of data to local storage every 3, 2, or 1 seconds
Magnetic field sensor Listens for continuous updates of the magnetic field sensor
Microphone Records audio from microphone
Networking (x3) Sends an HTTP Get requests every 3, 2, or 1 seconds
Room database (x3) Writes 1 MB of data via the Room Android library every 3, 2, or 1 seconds
Speaker Plays audio file at half volume
Each app continuously
stresses the same
component until it is killed
Fully reusable, even
independently of Android
Runner
Ivano Malavolta - https://github.com/S2-group/android-runner
Benchmarking Android Runner (excerpt - batterystats)
c
Ivano Malavolta - https://github.com/S2-group/android-runner
Benchmarking Android Runner (excerpt - batterystats)
The older device (Nexus 5X) tends to consume more energy
● Not for the camera app
Low coefficient of variation (<5% for 22 over 27 apps)
Camera, display, and GPS (high frequency) tend to consume more energy
All network-related apps tend to have higher variation
Ivano Malavolta - https://github.com/S2-group/android-runner
Android Runner as a learning platform
Android
Runner
Green Lab Final projects
● Green Lab = Master course on
empirical software engineering
for energy efficient software
● Students use Android Runner
as black-box tool for their own
experiments
● Students go deeper on
run-time profiling
○ Plugins for new profilers
○ Improve Android Runner
● Community of learners
● Discover and fix bugs
● Android Runner always up to date
● Learn the basics of OSS development
Ivano Malavolta - https://github.com/S2-group/android-runner
Conclusions
https://github.com/S2-group/android-runner

More Related Content

More from Ivano Malavolta

Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...Ivano Malavolta
 
Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...Ivano Malavolta
 
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...Ivano Malavolta
 
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...Ivano Malavolta
 
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Ivano Malavolta
 
Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...Ivano Malavolta
 
[2017/2018] Agile development
[2017/2018] Agile development[2017/2018] Agile development
[2017/2018] Agile developmentIvano Malavolta
 
Reconstructing microservice-based architectures
Reconstructing microservice-based architecturesReconstructing microservice-based architectures
Reconstructing microservice-based architecturesIvano Malavolta
 
[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design Language[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design LanguageIvano Malavolta
 
[2017/2018] Architectural languages
[2017/2018] Architectural languages[2017/2018] Architectural languages
[2017/2018] Architectural languagesIvano Malavolta
 
[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software Architecture[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software ArchitectureIvano Malavolta
 
[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineeringIvano Malavolta
 
Mobile Apps quality - a tale about energy, performance, and users’ perception
Mobile Apps quality - a tale about energy, performance, and users’ perceptionMobile Apps quality - a tale about energy, performance, and users’ perception
Mobile Apps quality - a tale about energy, performance, and users’ perceptionIvano Malavolta
 
[13 - B] Experiment reporting
[13 - B] Experiment reporting[13 - B] Experiment reporting
[13 - B] Experiment reportingIvano Malavolta
 
[13 - A] Experiment validity
[13 - A] Experiment validity[13 - A] Experiment validity
[13 - A] Experiment validityIvano Malavolta
 
[09-A] Statistical tests and effect size
[09-A] Statistical tests and effect size[09-A] Statistical tests and effect size
[09-A] Statistical tests and effect sizeIvano Malavolta
 
[07-B] Statistical hypothesis testing
[07-B] Statistical hypothesis testing[07-B] Statistical hypothesis testing
[07-B] Statistical hypothesis testingIvano Malavolta
 
[07-A] Descriptive Statistics and data exploration
[07-A] Descriptive Statistics and data exploration[07-A] Descriptive Statistics and data exploration
[07-A] Descriptive Statistics and data explorationIvano Malavolta
 
[05-B] Experiment design (advanced)
[05-B] Experiment design (advanced)[05-B] Experiment design (advanced)
[05-B] Experiment design (advanced)Ivano Malavolta
 
[05-A] Experiment design (basics)
[05-A] Experiment design (basics)[05-A] Experiment design (basics)
[05-A] Experiment design (basics)Ivano Malavolta
 

More from Ivano Malavolta (20)

Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
Modeling objects interaction via UML sequence diagrams [Software Design] [Com...
 
Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...Modeling behaviour via UML state machines [Software Design] [Computer Science...
Modeling behaviour via UML state machines [Software Design] [Computer Science...
 
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...Object-oriented design patterns in UML [Software Design] [Computer Science] [...
Object-oriented design patterns in UML [Software Design] [Computer Science] [...
 
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
Structure modeling with UML [Software Design] [Computer Science] [Vrije Unive...
 
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
Requirements engineering with UML [Software Design] [Computer Science] [Vrije...
 
Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...Modeling and abstraction, software development process [Software Design] [Com...
Modeling and abstraction, software development process [Software Design] [Com...
 
[2017/2018] Agile development
[2017/2018] Agile development[2017/2018] Agile development
[2017/2018] Agile development
 
Reconstructing microservice-based architectures
Reconstructing microservice-based architecturesReconstructing microservice-based architectures
Reconstructing microservice-based architectures
 
[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design Language[2017/2018] AADL - Architecture Analysis and Design Language
[2017/2018] AADL - Architecture Analysis and Design Language
 
[2017/2018] Architectural languages
[2017/2018] Architectural languages[2017/2018] Architectural languages
[2017/2018] Architectural languages
 
[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software Architecture[2017/2018] Introduction to Software Architecture
[2017/2018] Introduction to Software Architecture
 
[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering
 
Mobile Apps quality - a tale about energy, performance, and users’ perception
Mobile Apps quality - a tale about energy, performance, and users’ perceptionMobile Apps quality - a tale about energy, performance, and users’ perception
Mobile Apps quality - a tale about energy, performance, and users’ perception
 
[13 - B] Experiment reporting
[13 - B] Experiment reporting[13 - B] Experiment reporting
[13 - B] Experiment reporting
 
[13 - A] Experiment validity
[13 - A] Experiment validity[13 - A] Experiment validity
[13 - A] Experiment validity
 
[09-A] Statistical tests and effect size
[09-A] Statistical tests and effect size[09-A] Statistical tests and effect size
[09-A] Statistical tests and effect size
 
[07-B] Statistical hypothesis testing
[07-B] Statistical hypothesis testing[07-B] Statistical hypothesis testing
[07-B] Statistical hypothesis testing
 
[07-A] Descriptive Statistics and data exploration
[07-A] Descriptive Statistics and data exploration[07-A] Descriptive Statistics and data exploration
[07-A] Descriptive Statistics and data exploration
 
[05-B] Experiment design (advanced)
[05-B] Experiment design (advanced)[05-B] Experiment design (advanced)
[05-B] Experiment design (advanced)
 
[05-A] Experiment design (basics)
[05-A] Experiment design (basics)[05-A] Experiment design (basics)
[05-A] Experiment design (basics)
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

A Framework for the Automatic Execution of Measurement-based Experiments on Android Devices [A-mobile 2020]

  • 1. Ivano Malavolta - https://github.com/S2-group/android-runner A Framework for the Automatic Execution of Measurement-based Experiments on Android Devices Ivano Malavolta, Eoin Grua, Cheng-Yu Lam, Randy de Vries, Franky Tan, Eric Zielinski, Michael Peters, Luuk Kaandorp
  • 2. Ivano Malavolta - https://github.com/S2-group/android-runner Run-time measurement of Android apps is difficult ● It requires large boilerplate code ● Measurement tools must be carefully setup ● Various empirical best practices are scattered across the literature ● Experiments can take several hours of sheer execution time ● Existing experimental pipelines are ○ Ad-hoc for one specific experiment ○ Tailored to one specific quality attribute (e.g., energy efficiency) → Poor replicability + many research groups reinventing the wheel
  • 3. Ivano Malavolta - https://github.com/S2-group/android-runner Android Runner A framework to automatically execute measurement-based experiments on native and web apps Android Runner Intuition - users define their experiment in a descriptive fashion, and then its execution is fully automatic, customizable, and replicable Practitioner Researcher Researcher Conducting empirical studies on Android apps Developing new run-time profilers for Android devices Measuring the quality of their apps at run-time
  • 4. Ivano Malavolta - https://github.com/S2-group/android-runner Design drivers of Android Runner Experiments executed without any interaction from the researcherAutomation Incremental experiments Customizability Usability Profiler independence Experiments replicability Pause/resume mechanism Experiments defined in a descriptive fashion Possibility to add your own business logic or automated testing tool Either hardware or software profilers, support for multiple profilers in parallel Possibility to easily execute an already-performed experiment
  • 5. Ivano Malavolta - https://github.com/S2-group/android-runner Overview of Android Runner
  • 6. Ivano Malavolta - https://github.com/S2-group/android-runner Experiment orchestrator - input Experiment configuration
  • 7. Ivano Malavolta - https://github.com/S2-group/android-runner Experiment orchestrator - tasks 1. Perform diagnostic checks ○ User input, e.g., all subjects’ APKs are present ○ Environment, e.g., check if external tools like ADB are properly configured 2. Setup the devices via the Devices manager 3. Bring up the profilers specified in the experiment configuration via the Plugin handler 4. Setup the plan of the runs via the Progress manager 5. Execute the runs according to the sequence defined in the plan 6. Clean up the devices via the Devices manager ○ e.g., uninstall all subjects in case of native experiment 7. Aggregate the collected measures
  • 8. Ivano Malavolta - https://github.com/S2-group/android-runner External scripts Optional Python scripts for executing custom behaviour at specific points of the experiment before_experiment Before the first run of the experiment before_run Before every run of the experiment after_launch After the current subject is launched, but before measurement starts interaction During the measurement window (e.g., usage scenarios) before_close Before the current subject is closed after_run After every run completes after_experiment After the last run of the experiment
  • 9. Ivano Malavolta - https://github.com/S2-group/android-runner Examples of uses of external scripts ● Replay previously recorded usage scenarios (interaction) ○ Python ○ Monkerunner JSON format ● Bring up a local web proxy for recording all traffic generated by the subjects (before_experiment) ● Programmatically pass a login screen (interaction) ● Throttle the network connection to simulate slower/faster networks
  • 10. Ivano Malavolta - https://github.com/S2-group/android-runner Devices manager Layer of abstraction on the low-level operations on the devices ● Diagnostic checks on the ADB connection to each device ● Programmatically enable/disable USB charging ● List/install/uninstall apps on the devices ● Launch/stop/force-terminate processes on the device ● Read/write files on the device Devices
  • 11. Ivano Malavolta - https://github.com/S2-group/android-runner Progress manager ● Build the plan of all the runs of the experiment ● Shuffle the plan, if requested by the user ● Provide the plan to the orchestrator ● Persist the current status of the plan during the experiment ID Subject Device RunIndex run1 com.facebook.katana lg5x 1 run2 com.twitter.android lg5x 16 ... ... ... ...
  • 12. Ivano Malavolta - https://github.com/S2-group/android-runner Plugin handler ● Profilers as third-party plug-ins ● Extension point for plugin developers exposing: ○ the Devices manager ○ the current subject being executed ○ ... ● Each plugin follows the same lifecycle
  • 13. Ivano Malavolta - https://github.com/S2-group/android-runner Available plugins Di Nucci et al. Software-based energy profiling of android apps: Simple, efficient and reliable? SANER 2017. Luis Cruz. Tools and Techniques for Energy-Efficient Mobile Application Development. PhD thesis, 2019. Hecht et al. An empirical study of the performance impacts of android code smells. MOBILESoft 2016.
  • 14. Ivano Malavolta - https://github.com/S2-group/android-runner Outputs ● ○ Produced by the plugins ○ The format is plugin-dependent ■ Higher degree of freedom for plugin developers ■ Usually CSV files ■ The convention is to always save the measures in the file system → higher replicability ○ Based on the logcat Android tool ○ Contains all system messages during all runs ○ Allows future inspections of problematic/interesting runs Measures Logs
  • 15. Ivano Malavolta - https://github.com/S2-group/android-runner Generic benchmarking apps https://github.com/S2-group/ android-apps-benchmark App Description Baseline No functionality (idle) Accelerometer Listens for accelerometer data Ambient light sensor listens for changes in the ambient light sensor Camera (x3) Takes a picture from the front camera every 15, 10, or 5 seconds CPU (x3) Computes a large factorial number every 3, 2, or 1 seconds Display Plays a video at full brightness GPS (x3) Listens for location updates every 3, 2, or 1 seconds Gravity sensor Listens for continuous updates of the gravity sensor Gyroscope Listens for continuous updates of the gyroscope Local storage (x3) Writes 1 MB of data to local storage every 3, 2, or 1 seconds Magnetic field sensor Listens for continuous updates of the magnetic field sensor Microphone Records audio from microphone Networking (x3) Sends an HTTP Get requests every 3, 2, or 1 seconds Room database (x3) Writes 1 MB of data via the Room Android library every 3, 2, or 1 seconds Speaker Plays audio file at half volume Each app continuously stresses the same component until it is killed Fully reusable, even independently of Android Runner
  • 16. Ivano Malavolta - https://github.com/S2-group/android-runner Benchmarking Android Runner (excerpt - batterystats) c
  • 17. Ivano Malavolta - https://github.com/S2-group/android-runner Benchmarking Android Runner (excerpt - batterystats) The older device (Nexus 5X) tends to consume more energy ● Not for the camera app Low coefficient of variation (<5% for 22 over 27 apps) Camera, display, and GPS (high frequency) tend to consume more energy All network-related apps tend to have higher variation
  • 18. Ivano Malavolta - https://github.com/S2-group/android-runner Android Runner as a learning platform Android Runner Green Lab Final projects ● Green Lab = Master course on empirical software engineering for energy efficient software ● Students use Android Runner as black-box tool for their own experiments ● Students go deeper on run-time profiling ○ Plugins for new profilers ○ Improve Android Runner ● Community of learners ● Discover and fix bugs ● Android Runner always up to date ● Learn the basics of OSS development
  • 19. Ivano Malavolta - https://github.com/S2-group/android-runner Conclusions https://github.com/S2-group/android-runner