Skip to main content

BatteryLab: A Collaborative Platform for Power Monitoring

https://batterylab.dev

  • Conference paper
  • First Online:
Passive and Active Measurement (PAM 2022)

Abstract

Advances in cloud computing have simplified the way that both software development and testing are performed. This is not true for battery testing for which state of the art test-beds simply consist of one phone attached to a power meter. These test-beds have limited resources, access, and are overall hard to maintain; for these reasons, they often sit idle with no experiment to run. In this paper, we propose to share existing battery testbeds and transform them into vantage points of BatteryLab, a power monitoring platform offering heterogeneous devices and testing conditions. We have achieved this vision with a combination of hardware and software which allow to augment existing battery test-beds with remote capabilities. BatteryLab currently counts three vantage points, one in Europe and two in the US, hosting three Android devices and one iPhone 7. We benchmark BatteryLab with respect to the accuracy of its battery readings, system performance, and platform heterogeneity. Next, we demonstrate how measurements can be run atop of BatteryLab by developing the “Web Power Monitor” (WPM), a tool which can measure website power consumption at scale. We released WPM and used it to report on the energy consumption of Alexa’s top 1,000 websites across 3 locations and 4 devices (both Android and iOS).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The SSH agent at the node also needs to be configured accordingly. An iptable rule should be added to limit access to the access server only.

  2. 2.

    Either using Android bug-report files or with adb shell cat sys/class/power_supply/*/uevent.

  3. 3.

    These tests were not possible on AWS Device Farm [4] due to lack of ADB access.

References

  1. Alay, Ö., et al.: Experience: an open platform for experimentation with commercial mobile broadband networks. In: Proceedings of the ACM MobiCom (2017)

    Google Scholar 

  2. Almeida, M., et al.: Chimp: crowdsourcing human inputs for mobile phones. In: Proceedings of the WWW (2018)

    Google Scholar 

  3. Amazon Inc.: Amazon Mechanical Turk (2022). https://www.mturk.com/

  4. Amazon Inc.: AWS Device Farm (2022). https://aws.amazon.com/device-farm/

  5. Amazon Inc.: Route 53 DNS (2022). https://aws.amazon.com/route53/

  6. Appetize: Run native mobile apps in your browser (2022). https://appetize.io/

  7. Apple Inc.: SharePlay (2021). https://developer.apple.com/shareplay/

  8. Apple Inc.: How to AirPlay video and mirror your device’s screen (2022). https://support.apple.com/HT204289

  9. BatteryLab: Batterylab tutorial for new members (2022). https://batterylab.dev/tutorial/blab-tutorial.pdf

  10. BatteryLab: The Web power monitor (2022). https://batterylab.dev/test-website.html

  11. Bluetooth SIG Inc: Human Interface Device (HID) Profile (2022). https://www.bluetooth.com/specifications/profiles-overview/

  12. BlueZ Project: BlueZ: Official Linux Bluetooth protocol stack (2022). http://www.bluez.org

  13. Bui, D.H., Liu, Y., Kim, H., Shin, I., Zhao, F.: Rethinking energy-performance trade-off in mobile web page loading. In: Proceedings of the ACM MobiCom (2015)

    Google Scholar 

  14. Cao, Y., Nejati, J., Wajahat, M., Balasubramanian, A., Gandhi, A.: Deconstructing the energy consumption of the mobile page load. In: Proceedings of the ACM on Measurement and Analysis of Computing Systems, vol. 1, no. 1, pp. 6:1–6:25 (2017)

    Google Scholar 

  15. Chen, X., Ding, N., Jindal, A., Hu, Y.C., Gupta, M., Vannithamby, R.: Smartphone energy drain in the wild: analysis and implications. In: Proceedings of the ACM SIGMETRICS (2015)

    Google Scholar 

  16. Data protection: Rules for the protection of personal data inside and outside the EU (2022). https://ec.europa.eu/info/law/law-topic/data-protection_en

  17. Florian Draschbacher: RPiPlay - An open-source AirPlay mirroring server for the Raspberry Pi (2022). https://github.com/FD-/RPiPlay

  18. Genymobile: Display and control your Android device (2022). https://github.com/Genymobile/scrcpy

  19. Google Inc.: Android Debug Bridge (2022). https://developer.android.com/studio/command-line/adb

  20. Greenspector: Test in the cloud with real mobile devices (2022). https://greenspector.com/en/

  21. Hwang, C., et al.: Raven: perception-aware optimization of power consumption for mobile games. In: Proceedings of the ACM MobiCom (2017)

    Google Scholar 

  22. Jenkins: The leading open source automation server (2022). https://jenkins.io/

  23. Let’s Encrypt: A a free, automated, and open Certificate Authority (2022). https://letsencrypt.org

  24. Leung, C., Ren, J., Choffnes, D., Wilson, C.: Should you use the app for that?: comparing the privacy implications of app- and web-based online services. In: Proceedings of the ACM IMC (2016)

    Google Scholar 

  25. Varvello, M., Katevas, K.: BatteryLab Source Code (2022). https://github.com/svarvel/batterylab

  26. Microsoft, Visual Studio: App Center is mission control for apps (2022). https://appcenter.ms/sign-in

  27. Mobile Enerlytics: The Leader in Automated App Testing Innovations to Reduce Battery Drain (2022). http://mobileenerlytics.com/

  28. MONROE - H2022-ICT-11-2014: Measuring Mobile Broadband Networks in Europe (2022). https://www.monroe-project.eu/wp-content/uploads/2017/12/Deliverable-D2.2-Node-Deployment.pdf

  29. Monsoon Solutions Inc.: High voltage power monitor (2022). https://www.msoon.com

  30. Monsoon Solutions Inc.: Monsoon Power Monitor Python Library (2022). https://github.com/msoon/PyMonsoon

  31. noVNC: A VNC client JavaScript library as well as an application built on top of that library (2022). https://novnc.com

  32. Onwuzurike, L., De Cristofaro, E.: Danger is my middle name: experimenting with SSL vulnerabilities in Android apps. In: WiSec (2015)

    Google Scholar 

  33. ProtonVPN: High-speed Swiss VPN that safeguards your privacy (2022). https://protonvpn.com/

  34. Raspberry Pi: Raspberry Pi 3 Model B+ (2022). https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/

  35. Ren, J., Rao, A., Lindorfer, M., Legout, A., Choffnes, D.: Recon: revealing and controlling PII leaks in mobile network traffic. In: MobiSys (2016)

    Google Scholar 

  36. RunThatApp: Enjoy Mobile Apps In The Browser (2022). https://runthatapp.com

  37. Samsung: Remote Test Lab (2022). https://developer.samsung.com/remote-test-lab

  38. Schulman, A., Schmid, T., Dutta, P., Spring, N.: Phone power monitoring with battor. In: Proceedings of the ACM MobiCom (2011)

    Google Scholar 

  39. TeamViewer GmbH.: TeamViewer (2022). https://www.teamviewer.com/

  40. Thiagarajan, N., Aggarwal, G., Nicoara, A., Boneh, D., Singh, J.P.: Who killed my battery?: analyzing mobile browser energy consumption. In: Proceedings of WWW (2012)

    Google Scholar 

  41. TigerVNC: A high-performance, platform-neutral implementation of VNC (Virtual Network Computing) (2022). https://tigervnc.org

  42. USB Implementers’ Forum: Universal Serial Bus HID Usage Tables (2022). https://www.usb.org/document-library/hid-usage-tables-112

  43. Mikhailov, V.: uhubctl - USB hub per-port power control (2022). https://github.com/mvp/uhubctl

  44. Varvello, M., Katevas, K., Plesa, M., Haddadi, H., Livshits, B.: Batterylab, a distributed power monitoring platform for mobile devices. In: HotNets (2019)

    Google Scholar 

  45. Webpagetest: Test website performance (2022). https://www.webpagetest.org/

  46. Wittenburg, P., Brugman, H., Russel, A., Klassmann, A., Sloetjes, H.: Elan: a professional framework for multimodality research. In: LREC, vol. 2006 (2006)

    Google Scholar 

Download references

Acknowledgment

This work was partially supported by the EPSRC Databox and DADA grants (EP/N028260/1, EP/R03351X/1).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Matteo Varvello .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Varvello, M., Katevas, K., Plesa, M., Haddadi, H., Bustamante, F., Livshits, B. (2022). BatteryLab: A Collaborative Platform for Power Monitoring. In: Hohlfeld, O., Moura, G., Pelsser, C. (eds) Passive and Active Measurement. PAM 2022. Lecture Notes in Computer Science, vol 13210. Springer, Cham. https://doi.org/10.1007/978-3-030-98785-5_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-98785-5_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-98784-8

  • Online ISBN: 978-3-030-98785-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics