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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The repository is available online at http://sir.unl.edu [Retrieved 2018-01-05].
- 2.
- 3.
Hardware specifics of the SUT adopted for experimentation: AMD Ryzen 7 1700, GeForce GTX 1060, 16 GB DDR4 RAM @ 2133 MHz, MSI B350 PC Mate, running Ubuntu 16.4 LTS.
- 4.
Power meter utilized for the measurements: Janitza UMG 604 Power Analyser. Sampling rate: 20 kHz, resolution: 10 mV, 1.0 mA.
- 5.
One use case scenario consists of all test cases from the SIR test suite for the program “grep”. Each test case was repeated 5000 times in each scenario. Thus, each test case was run 80,000 times (see also Sect. 4.2).
- 6.
Empirical measurements could be collected even during normal testing processes by measuring the runtime energy consumption during the test case execution. Additionally, if regression testing processes are adopted (i.e. coverage data is already available), coverage information does not need to be acquired, further accelerating the hotspot detection process.
References
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)
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)
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)
Banerjee, A., Chattopadhyay, S., Roychoudhury, A.: Chapter three-on testing embedded software. Advanc. Comput. 101, 121–153 (2016)
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)
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)
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)
Bozzelli, P., Gu, Q., Lago, P.: A Systematic Literature Review on Green Software Metrics. VU University, Amsterdam (2013)
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)
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)
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)
Dirlewanger, W.: Measurement and Rating of Computer Systems Performance and of Software Efficiency. Kassel University Press, kassel (2006)
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)
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)
Hammadi, A., Mhamdi, L.: A survey on architectures and energy efficiency in data center networks. Comput. Commun. 40, 1–21 (2014)
Harizopoulos, S., Shah, M., Meza, J., Ranganathan, P.: Energy Efficiency: The New Holy Grail of Data Management Systems Research. arXiv:0909.1784 (2009)
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)
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)
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)
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)
Khalid, H., Shihab, E., Nagappan, M., Hassan, A.E.: What do mobile app users complain about? IEEE Softw. 32(3), 70–77 (2015)
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)
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)
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)
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)
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)
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)
Pang, C., Hindle, A., Adams, B., Hassan, A.E.: What do programmers know about software energy consumption? IEEE Softw. 33(3), 83–89 (2016)
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)
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)
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)
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)
Procaccianti, G., Fernandez, H., Lago, P.: Empirical evaluation of two best practices for energy-efficient software development. J. Syst. Softw. 117, 185–198 (2016)
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)
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)
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)
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)
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)
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)
Wilke, S.G.S.A.U., Richly, C.: Energy proling as a service. In: Proceedings of INFORMATIK 2013, GI, LNI, pp. 1043–1052 (2013)
Zein, S., Salleh, N., Grundy, J.: A systematic mapping study of mobile application testing techniques. J. Syst. Softw. 117, 334–356 (2016)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Verdecchia, R., Guldner, A., Becker, Y., Kern, E. (2018). Code-Level Energy Hotspot Localization via Naive Spectrum Based Testing. In: Bungartz, HJ., Kranzlmüller, D., Weinberg, V., Weismüller, J., Wohlgemuth, V. (eds) Advances and New Trends in Environmental Informatics. Progress in IS. Springer, Cham. https://doi.org/10.1007/978-3-319-99654-7_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-99654-7_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-99653-0
Online ISBN: 978-3-319-99654-7
eBook Packages: Computer ScienceComputer Science (R0)