5 research outputs found

    Towards energy-aware coding practices for Android

    Get PDF
    This paper studies how the use of different coding practices when developing Android applications influence energy consumption. We consider two common Java/Android programming practices, namely string operations and (non) cached image loading, and we show the energy profile of different coding practices for doing them. With string operations, we compare the performance of the usage of the standard String class to the usage of the StringBuilder class, while with our second practice we evaluate the benefits of image caching with asynchronous loading. We externally measure energy consumption of the example applications using the Trepn profiler application by Qualcomm. Our preliminary results show that selected coding practices do significantly affect energy consumption, in the particular cases of our practice selection, this difference varies between 20% and 50%.This work is funded by the Slovak Research and Development Agency under the contract No. SK-PT2015-0037 and by the Portugal-Slovakia Cooperation FCT Project (Ref. 441), and by the ERDF – European Regional Development Fund through the Operational Programme for Competitiveness and Internationalisation - COMPETE 2020 Programme and by National Funds through the Portuguese funding agency, FCT – Fundacão para a Ciência e a Tecnologia within project POCI-01-0145- FEDER-016718

    SPELLing out energy leaks: Aiding developers locate energy inefficient code

    Get PDF
    Although hardware is generally seen as the main culprit for a computer's energy usage, software too has a tremendous impact on the energy spent. Unfortunately, there is still not enough support for software developers so they can make their code more energy-aware.This paper proposes a technique to detect energy inefficient fragments in the source code of a software system. Test cases are executed to obtain energy consumption measurements, and a statistical method, based on spectrum-based fault localization, is introduced to relate energy consumption to the source code. The result of our technique is an energy ranking of source code fragments pointing developers to possible energy leaks in their code. This technique was implemented in the SPELL toolkit.Finally, in order to evaluate our technique, we conducted an empirical study where we asked participants to optimize the energy efficiency of a software system using our tool, while also having two other groups using no tool assistance and a profiler, respectively. We showed statistical evidence that developers using our technique were able to improve the energy efficiency by 43% on average, and even out performing a profiler for energy optimization. (C) 2019 Elsevier Inc. All rights reserved.This work is funded by the ERDF -European Regional Development Fund through the Operational Programme for Competitiveness and Internationalization -COMPETE 2020 Programme within project POCI-01-0145-FEDER-006961, and by National Funds through the Portuguese funding agency, FCT -Fundacao para a Ciencia e a Tecnologia within project POCI010145FEDER016718, UID/EEA/50014/2013, and by FCT grant SFRH/BD/132485/2017. This work is also supported by operation Centro010145FEDER000019 -C4 -Centro de Competencias em Cloud Computing, cofinanced by the European Regional Development Fund (ERDF) through the Programa Operacional Regional do Centro (Centro 2020), in the scope of the Sistema de Apoio a Investigacao Cientifica e Tecnologica -Programas Integrados de IC&DT, and the first author was financed by post-doc grant referencia C4_SMDS_L1-1_D

    Statically analyzing the energy efficiency of software product lines

    Get PDF
    Optimizing software to become (more) energy efficient is an important concern for the software industry. Although several techniques have been proposed to measure energy consumption within software engineering, little work has specifically addressed Software Product Lines (SPLs). SPLs are a widely used software development approach, where the core concept is to study the systematic development of products that can be deployed in a variable way, e.g., to include different features for different clients. The traditional approach for measuring energy consumption in SPLs is to generate and individually measure all products, which, given their large number, is impractical. We present a technique, implemented in a tool, to statically estimate the worst-case energy consumption for SPLs. The goal is to reason about energy consumption in all products of a SPL, without having to individually analyze each product. Our technique combines static analysis and worst-case prediction with energy consumption analysis, in order to analyze products in a feature-sensitive manner: a feature that is used in several products is analyzed only once, while the energy consumption is estimated once per product. This paper describes not only our previous work on worst-case prediction, for comprehensibility, but also a significant extension of such work. This extension has been realized in two different axis: firstly, we incorporated in our methodology a simulated annealing algorithm to improve our worst-case energy consumption estimation. Secondly, we evaluated our new approach in four real-world SPLs, containing a total of 99 software products. Our new results show that our technique is able to estimate the worst-case energy consumption with a mean error percentage of 17.3% and standard deviation of 11.2%.This paper acknowledges the support of the Erasmus+ Key Action 2 (Strategic partnership for higher education) project No. 2020-1-PT01-KA203-078646: SusTrainable-Promoting Sustainability as a Fundamental Driver in Software Development Training and Education

    A formal approach to automatically analyse extra-functionalproperties in mobile applications.

    Get PDF
    This paper presents an integrated approach for testing mobile applications (apps) against a set of extra-functional properties to be used by app developers. The approach starts with the (manual or automatic)extraction of the interaction model, that is, a formal model of the potential user interactions with the app.The model is constructed to allow a model checking tool to exhaustively extract the so-called app user flows, that is, the sequences of user actions, that constitute the test cases. In the final step, the app user flows are executed on the app running on real devices. The resulting execution traces are enriched with different measures and verified against a set of extra-functional properties of interest. The approach has been adapted to analyse several applications running at the same time with several devices supporting the applications.This paper presents the definition and formalization of both the modelling language for the interaction model and the specification language to represent the extra-functional properties. It also describes a methodology for automatically extracting the model. Finally, it presents an implementation focused on Android apps, which is integrated in the TRIANGLE testing framework, and the evaluation of the approach.Work is partially supported by the Spanish Ministry of Economy and Competitiveness projectTIN2015-67083-R. This project has received funding from the European Union’s Horizon 2020research and innovation programme under grant agreement no. 688712 (TRIANGLE project)
    corecore