Advertisement

Code-Level Energy Hotspot Localization via Naive Spectrum Based Testing

  • Roberto VerdecchiaEmail author
  • Achim Guldner
  • Yannick Becker
  • Eva Kern
Conference paper
Part of the Progress in IS book series (PROIS)

Abstract

With the growing adoption of ICT solutions, developing energy efficient software becomes increasingly important. Current methods aimed at analyzing energy demanding portions of code, referred to as energy hotspots, often require ad-hoc analyses that constitute an additional process in the development life cycle. This leads to the scarce adoption of such methods in practice, leaving an open gap between source code energy optimization research and its concrete application. Thus, our underlying goal is to provide developers with a technique that enables them to efficiently gather source code energy consumption information without requiring excessive time overhead and resources. In this research we present a naive spectrum-based fault localization technique aimed to efficiently locate energy hotspots. More specifically, our research aims to understand the viability of spectrum based energy hotspot localization and the tradeoffs which can be made between performance and precision for such techniques. Our naive yet effective approach takes as input an application and its test suite, and utilizes a simple algorithm to localize portions of code which are potentially energy-greedy. This is achieved by combining test case coverage information with runtime energy consumption measurements. The viability of the approach is assessed through an empirical experiment. We conclude that the naive spectrum based energy hotspot localization approach can effectively support developers by efficiently providing insights of the energy consumption of software at source code level. Since we use processes already in place in most companies and adopt straightforward data analysis processes, naive spectrum based energy hotspot localization can reduce the effort and time required for assessing energy consumption of software and thus make including the energy consumption in the development process viable. As future work we plan to (i) further investigate the tradeoffs between performance and precision of spectrum based energy hotspot approaches (ii) compare our approach to similar ones through large-scale experiments. Our ultimate goal is to conceive ad-hoc tradeoff tuning of performance and precision according to development and organizational needs.

References

  1. 1.
    Abreu, R., Zoeteweij, P., Golsteijn, R., Van Gemund, A.J.: A practical evaluation of spectrum-based fault localization. J. Syst. Softw. 82(11), 1780–1792 (2009)CrossRefGoogle Scholar
  2. 2.
    Abreu, R., Zoeteweij, P., Van Gemund, A.J.: Spectrum-based multiple fault localization. In: Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, pp. 88–99. IEEE Computer Society (2009)Google Scholar
  3. 3.
    Ahmad, R.W., Gani, A., Hamid, S.H.A., Xia, F., Shiraz, M.: A review on mobile application energy profiling: taxonomy, state-of-the-art, and open research issues. J. Netw. Comput. Appl. 58, 42–59 (2015)CrossRefGoogle Scholar
  4. 4.
    Banerjee, A., Chattopadhyay, S., Roychoudhury, A.: Chapter three-on testing embedded software. Advanc. Comput. 101, 121–153 (2016)CrossRefGoogle Scholar
  5. 5.
    Banerjee, A., Chong, L.K., Chattopadhyay, S., Roychoudhury, A.: Detecting energy bugs and hotspots in mobile apps. In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 588–598. ACM (2014)Google Scholar
  6. 6.
    Becker, Y., Naumann, S.: Software based estimation of software induced energy dissipation with powerstat. In: From Science to Society: The Bridge provided by Environmental Informatics, pp. 69–73. Shaker Verlag (2017)Google Scholar
  7. 7.
    Beloglazov, A., Abawajy, J., Buyya, R.: Energy-aware resource allocation heuristics for efficient management of data centers for cloud computing. Fut. Generat. Comput. Syst. 28(5), 755–768 (2012)CrossRefGoogle Scholar
  8. 8.
    Bozzelli, P., Gu, Q., Lago, P.: A Systematic Literature Review on Green Software Metrics. VU University, Amsterdam (2013)Google Scholar
  9. 9.
    Calero, C., Bertoa, M.E., Moraga, M.Á: A systematic literature review for software sustainability measures. In: Proceedings of the 2nd International Workshop on Green and Sustainable Software, pp. 46–53. IEEE Press (2013)Google Scholar
  10. 10.
    Chung, Y.F., Lin, C.-Y., King, C.-T.: Aneprof: energy profiling for android java virtual machine and applications. In: 2011 IEEE 17th International Conference on Parallel and Distributed Systems (ICPADS), pp. 372–379. IEEE (2011)Google Scholar
  11. 11.
    Datta, S.K., Bonnet, C., Nikaein, N.: Android power management: Current and future trends. In: 2012 First IEEE Workshop on Enabling Technologies for Smartphone and Internet of Things (ETSIoT), pp. 48–53. IEEE (2012)Google Scholar
  12. 12.
    Dirlewanger, W.: Measurement and Rating of Computer Systems Performance and of Software Efficiency. Kassel University Press, kassel (2006)Google Scholar
  13. 13.
    Do, H., Elbaum, S.G., Rothermel, G.: Supporting controlled experimentation with testing techniques: an infrastructure and its potential impact. Empiric. Softw. Eng. Int. J. 10(4), 405–435 (2005)CrossRefGoogle Scholar
  14. 14.
    Guldner, A., Garling, M., Morgen, M., Naumann, S., Kern, E., Hilty, L.M.H.: Energy consumption and hardware utilization of standard software: Methods and measurements for software sustainability. In: From Science to Society: New Trends in Environmental Informatics, pp. 251–261. Springer International Publishing (2017)Google Scholar
  15. 15.
    Hammadi, A., Mhamdi, L.: A survey on architectures and energy efficiency in data center networks. Comput. Commun. 40, 1–21 (2014)CrossRefGoogle Scholar
  16. 16.
    Harizopoulos, S., Shah, M., Meza, J., Ranganathan, P.: Energy Efficiency: The New Holy Grail of Data Management Systems Research. arXiv:0909.1784 (2009)
  17. 17.
    Hindle, A., Wilson, A., Rasmussen, K., Barlow, E.J., Campbell, J.C., Romansky, S.: Greenminer: a hardware based mining software repositories software energy consumption framework. In: Proceedings of the 11th Working Conference on Mining Software Repositories, pp. 12–21. ACM (2014)Google Scholar
  18. 18.
    Hoque, M.A., Siekkinen, M., Khan, K.N., Xiao, Y., Tarkoma, S.: Modeling, profiling, and debugging the energy consumption of mobile devices. ACM Comput. Surv. (CSUR) 48(3), 39 (2016)Google Scholar
  19. 19.
    Jabbarvand, R., Sadeghi, A., Garcia, J., Malek, S., Ammann, P.: Ecodroid: an approach for energy-based ranking of android apps. In: Proceedings of the Fourth International Workshop on Green and Sustainable Software, pp. 8–14. IEEE Press (2015)Google Scholar
  20. 20.
    Johann, T., Dick, M., Naumann, S., Kern, E.: How to measure energy-efficiency of software: metrics and measurement results. In: Proceedings of the First International Workshop on Green and Sustainable Software, pp. 51–54. IEEE Press (2012)Google Scholar
  21. 21.
    Khalid, H., Shihab, E., Nagappan, M., Hassan, A.E.: What do mobile app users complain about? IEEE Softw. 32(3), 70–77 (2015)CrossRefGoogle Scholar
  22. 22.
    Koomey, J.: Growth in data center electricity use to 2010. A report by Analytical Press, completed at the request of The New York Times 9, 2011 (2005)Google Scholar
  23. 23.
    Li, D., Hao, S., Halfond, W.G., Govindan, R.: Calculating source line level energy information for android applications. In: Proceedings of the 2013 International Symposium on Software Testing and Analysis, pp. 78–89. ACM (2013)Google Scholar
  24. 24.
    Linares-Vásquez, M., Moran, K., Poshyvanyk, D.: Continuous, evolutionary and large-scale: A new perspective for automated mobile app testing. In: 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 399–410. IEEE (2017)Google Scholar
  25. 25.
    Liu, Y., Xu, C., Cheung, S.C.: Where has my battery gone? finding sensor related energy black holes in smartphone applications. In: 2013 IEEE International Conference on Pervasive Computing and Communications (PerCom), pp. 2–10. IEEE (2013)Google Scholar
  26. 26.
    Malavolta, I., Procaccianti, G., Noorland, P., Vukmirovic, P.: Assessing the impact of service workers on the energy efficiency of progressive web apps. In: Proceedings of the International Conference on Mobile Software Engineering and Systems, MOBILESoft ’17, Buenos Aires, Argentina, May, 2017, pp. 35–45 (2017)Google Scholar
  27. 27.
    Min, A.W., Wang, R., Tsai, J., Ergin, M.A., Tai, T.Y.C.; Improving energy efficiency for mobile platforms by exploiting low-power sleep states. In: Proceedings of the 9th conference on Computing Frontiers, pp. 133–142. ACM (2012)Google Scholar
  28. 28.
    Pang, C., Hindle, A., Adams, B., Hassan, A.E.: What do programmers know about software energy consumption? IEEE Softw. 33(3), 83–89 (2016)CrossRefGoogle Scholar
  29. 29.
    Pathak, A., Hu, Y.C., Zhang, M.: Where is the energy spent inside my app?: fine grained energy accounting on smartphones with eprof. In: Proceedings of the 7th ACM European Conference on Computer Systems, pp. 29–42. ACM (2012)Google Scholar
  30. 30.
    Penzenstadler, B., Raturi, A., Richardson, D., Calero, C., Femmer, H., Franch, X.: Systematic mapping study on software engineering for sustainability (se4s). In: Proceedings of the 18th International Conference on Evaluation and Assessment in Software Engineering, p. 14. ACM (2014)Google Scholar
  31. 31.
    Pereira., R.: Locating energy hotspots in source code. In: Proceedings of the 39th International Conference on Software Engineering Companion, pp. 88–90. IEEE Press (2017)Google Scholar
  32. 32.
    Pereira, R., Carção, T., Couto, M., Cunha, J., Fernandes, J.P., Saraiva, J.: Helping programmers improve the energy efficiency of source code. In: 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C), pp. 238–240. IEEE (2017)Google Scholar
  33. 33.
    Procaccianti, G., Fernandez, H., Lago, P.: Empirical evaluation of two best practices for energy-efficient software development. J. Syst. Softw. 117, 185–198 (2016)CrossRefGoogle Scholar
  34. 34.
    Rashid, M., Ardito, L., Torchiano, M.: Energy consumption analysis of algorithms implementations. In: 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pp. 1–4. IEEE (2015)Google Scholar
  35. 35.
    Reps, T., Ball, T., Das, M., Larus, J.: The use of program profiling for software maintenance with applications to the year 2000 problem. In: Software Engineering-Esec/Fse’97, pp. 432–449. Springer (1997)Google Scholar
  36. 36.
    Steinke, S., Knauer, M., Wehmeyer, L., Marwedel, P.: An accurate and fine grain instruction-level energy model supporting software optimizations. In: Proceedings of PATMOS (2001)Google Scholar
  37. 37.
    Van Heddeghem, W., Lambert, S., Lannoo, B., Colle, D., Pickavet, M., Demeester, P.: Trends in worldwide ict electricity consumption from 2007 to 2012. Comput. Commun. 50, 64–76 (2014)CrossRefGoogle Scholar
  38. 38.
    Verdecchia, R., Ricchiuti, F., Hankel, A., Lago, P., Procaccianti, G.: Green ICT research and challenges. In: Advances and New Trends in Environmental Informatics, pp. 37–48. Springer (2017)Google Scholar
  39. 39.
    Verdecchia, R., Saez, R., Procaccianti, G., Lago., P.: Empirical evaluation of the energy impact of refactoring code smells. In: 5th International Conference on ICT for Sustainability (2018)Google Scholar
  40. 40.
    Wilke, S.G.S.A.U., Richly, C.: Energy proling as a service. In: Proceedings of INFORMATIK 2013, GI, LNI, pp. 1043–1052 (2013)Google Scholar
  41. 41.
    Zein, S., Salleh, N., Grundy, J.: A systematic mapping study of mobile application testing techniques. J. Syst. Softw. 117, 334–356 (2016)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  • Roberto Verdecchia
    • 1
    • 2
    Email author
  • Achim Guldner
    • 3
  • Yannick Becker
    • 3
  • Eva Kern
    • 4
    • 5
  1. 1.Gran Sasso Science InstituteL’AquilaItaly
  2. 2.Vrije Universiteit AmsterdamAmsterdamThe Netherlands
  3. 3.University of Applied Sciences Trier, Environmental Campus BirkenfeldBirkenfeldGermany
  4. 4.Environmental Campus BirkenfeldBirkenfeldGermany
  5. 5.Leuphana University LueneburgLueneburgGermany

Personalised recommendations