Skip to content

luiscruz/greenbenchmark

Repository files navigation

Green Benchmarking

Mobile and wearable devices are nowadays the de facto personal computers, while desktop computers are becoming less popular. Therefore, it is important for companies to deliver energy-efficient mobile applications. We studied whether or not a set of best performance-based practices have an impact on the energy consumed by Android applications. In an experimental study with six popular mobile applications, we observed that the battery of the mobile device can last up to approximately an extra hour if the applications are developed with energy-aware practices. This work paves the way for a set of guidelines for energy-aware automatic refactoring techniques.

Apps

Studied Anti-Patterns

  • DrawAllocation
  • Wakelock
  • Recycle
  • ObsoleteLayoutParam
  • ViewHolder
  • Overdraw
  • UnusedResources
  • UselessParent

How to run scripts

Run experiments

  1. Connect your ODROID to you computer (other devices also work but you will not be able to collect power data)
  2. Create the file experiment_stack.csv. Each line has name of experiment, package name of the app, path to the apk, interaction test data file. E.g.: writeily-pro,me.writeily,apks/writeily-pro.apk,writely-pro-view_holder_cache.json. The experiment stacks used in the experiments are also available in this repository.
  3. $ sh run_experiment_stack.sh

Generate reports

After having results reports can be generated by running:

$ python report_all_results.py results_writeily-pro

ODROID energy collection script

Collection of power data is made using the shell script odroid_energy_monitor.sh. It has to be executed by the ODROID device and outputs power data in the file /sdcard/energy/energy_log.csv. This is automatically handled when running the script run_experiment_stack.sh.

We internally use ADB to automatically upload the script and run it on ODROID.

Interaction Scripts

Interaction scripts are stored in ./tests/. In order to run you can simply run:

$ python acrylicpaint.py

Make sure you have your Android device connected to your computer and USB debugging mode activated. Your app has to be previously installed and running in foreground.

This script generates a cache file (e.g., run_cached_script.json), to optimize further executions. You can use this cache by running

$ python run_cached_script.py tests/run_cached_script.json

Publications

Contact

For more information feel free to contact:

About

Benchmarking suite for energy consumption in Android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published