102 research outputs found

    Rohelisema tarkvaratehnoloogia poole tarkvaraanalüüsi abil

    Get PDF
    Mobiilirakendused, mis ei tühjenda akut, saavad tavaliselt head kasutajahinnangud. Mobiilirakenduste energiatõhusaks muutmiseks on avaldatud mitmeid refaktoreerimis- suuniseid ja tööriistu, mis aitavad rakenduse koodi optimeerida. Neid suuniseid ei saa aga seoses energiatõhususega üldistada, sest kõigi kontekstide kohta ei ole piisavalt energiaga seotud andmeid. Olemasolevad energiatõhususe parandamise tööriistad/profiilid on enamasti prototüübid, mis kohalduvad ainult väikese alamhulga energiaga seotud probleemide suhtes. Lisaks käsitlevad olemasolevad suunised ja tööriistad energiaprobleeme peamiselt a posteriori ehk tagantjärele, kui need on juba lähtekoodi sees. Android rakenduse koodi saab põhijoontes jagada kaheks osaks: kohandatud kood ja korduvkasutatav kood. Kohandatud kood on igal rakendusel ainulaadne. Korduvkasutatav kood hõlmab kolmandate poolte teeke, mis on rakendustesse lisatud arendusprotessi kiirendamiseks. Alustuseks hindame mitmete lähtekoodi halbade lõhnade refaktoreerimiste energiatarbimist Androidi rakendustes. Seejärel teeme empiirilise uuringu Androidi rakendustes kasutatavate kolmandate osapoolte võrguteekide energiamõju kohta. Pakume üldisi kontekstilisi suuniseid, mida võiks rakenduste arendamisel kasutada. Lisaks teeme süstemaatilise kirjanduse ülevaate, et teha kindlaks ja uurida nüüdisaegseid tugitööriistu, mis on rohelise Androidi arendamiseks saadaval. Selle uuringu ja varem läbi viidud katsete põhjal toome esile riistvarapõhiste energiamõõtmiste jäädvustamise ja taasesitamise probleemid. Arendame tugitööriista ARENA, mis võib aidata koguda energiaandmeid ja analüüsida Androidi rakenduste energiatarbimist. Viimasena töötame välja tugitööriista REHAB, et soovitada arendajatele energiatõhusaid kolmanda osapoole võrguteekeMobile apps that do not drain the battery usually get good user ratings. To make mobile apps energy efficient many refactoring guidelines and tools are published that help optimize the app code. However, these guidelines cannot be generalized w.r.t energy efficiency, as there is not enough energy-related data for every context. Existing energy enhancement tools/profilers are mostly prototypes applicable to only a small subset of energy-related problems. In addition, the existing guidelines and tools mostly address the energy issues a posteriori, i.e., once they have already been introduced into the code. Android app code can be roughly divided into two parts: the custom code and the reusable code. Custom code is unique to each app. Reusable code includes third-party libraries that are included in apps to speed up the development process. We start by evaluating the energy consumption of various code smell refactorings in native Android apps. Then we conduct an empirical study on the energy impact of third-party network libraries used in Android apps. We provide generalized contextual guidelines that could be used during app development Further, we conduct a systematic literature review to identify and study the current state of the art support tools available to aid green Android development. Based on this study and the experiments we conducted before, we highlight the problems in capturing and reproducing hardware-based energy measurements. We develop the support tool ‘ARENA’ that could help gather energy data and analyze the energy consumption of Android apps. Last, we develop the support tool ‘REHAB’ to recommend energy efficient third-party network libraries to developers.https://www.ester.ee/record=b547174

    Predicting the Impact of Batch Refactoring Code Smells on Application Resource Consumption

    Full text link
    Automated batch refactoring has become a de-facto mechanism to restructure software that may have significant design flaws negatively impacting the code quality and maintainability. Although automated batch refactoring techniques are known to significantly improve overall software quality and maintainability, their impact on resource utilization is not well studied. This paper aims to bridge the gap between batch refactoring code smells and consumption of resources. It determines the relationship between software code smell batch refactoring, and resource consumption. Next, it aims to design algorithms to predict the impact of code smell refactoring on resource consumption. This paper investigates 16 code smell types and their joint effect on resource utilization for 31 open source applications. It provides a detailed empirical analysis of the change in application CPU and memory utilization after refactoring specific code smells in isolation and in batches. This analysis is then used to train regression algorithms to predict the impact of batch refactoring on CPU and memory utilization before making any refactoring decisions. Experimental results also show that our ANN-based regression model provides highly accurate predictions for the impact of batch refactoring on resource consumption. It allows the software developers to intelligently decide which code smells they should refactor jointly to achieve high code quality and maintainability without increasing the application resource utilization. This paper responds to the important and urgent need of software engineers across a broad range of software applications, who are looking to refactor code smells and at the same time improve resource consumption. Finally, it brings forward the concept of resource aware code smell refactoring to the most crucial software applications

    Star-rating evaluation model for rating the energy-efficiency level of android google play apps

    Get PDF
    The tremendous increase in smartphone usage is accompanied by an increase in the need for more energy. This preoperational relationship between modern technology and energy generates energy-greedy apps, and therefore power-hungry end users. With many apps falling under the same category in an app store, these apps usually share similar functionality. Because developers follow different design and development schools, each app has its energy-consumption habits. Since apps share similar features, an end-user with limited access to recharging resources would prefer an energy-friendly app rather than a popular energy-greedy app. However, app stores do not indicate the energy behavior of the apps they offer, which causes users to randomly choose apps without understanding their energy-consumption behavior. A review of the relevant literature was provided covering various energy-saving techniques. The results gave an initial impression about the popularity of the usage of two power-saving modes where the average usage of these modes did not exceed 31% among the total 443 Android users. To address this issue, we propose a star-rating evaluation model (SREM), an approach that generates a tentative energy rating label for each app. The model was tested on 7 open-source apps to act as a primary evaluation sample. To that end, SREM adapts current energy-aware refactoring tools to demonstrate the level of energy consumption of an app and presents it in a star-rating schema similar to the Ecolabels used on electrical home appliances. As per our results, SREM helped in saving 35% of smartphone energy

    PENGARUH REFACTORING CODE SMELLS DENGAN AUTOMATIC STATIC ANALYSIS TOOLS TERHADAP PENGGUNAAN SUMBER DAYA PERANGKAT LUNAK SELULER ANDROID

    Get PDF
    Perangkat lunak memiliki keterbatasan sumber daya yaitu CPU dan memori. Investigasi penelitian lain mengungkapkan bahwa kode program buruk dapat berdampak pada penurunan kinerja yang berarti meningkatnya konsumsi pada CPU dan memori. Survei penelitian lain menunjukkan bahwa pengguna dapat menghapus pemasangan perangkat lunak karena adanya kinerja yang berlebihan (75,2%) sehingga perangkat lunak tidak berjalan dan konsumsi memori yang besar (42,6%). Kode program buruk disebabkan buruknya praktik penulisan kode dan implementasi yang menyebabkan pemeliharaan perangkat lunak jangka panjang dan berdampak negatif. Dampak negatif mengindikasikan dapat merusak pemeliharaan perangkat lunak dengan mengabaikan pelanggaran aturan yaitu code smells yang disebabkan gaya pemrograman yang buruk, kurangnya dokumentasi dan tingginya kompleksitas pada kode program. Sehingga solusi tersebut perlu adanya eksplorasi code smells dengan salah satu ASATs yang sudah digunakan oleh 85.000 organisasi bernama SonarQube dan dilanjutkan refactoring code smells tunggal dan kumulatif. Topik ini berkaitan dengan pemeliharaan perangkat lunak dengan tujuan untuk menganalisis code smells dan refactoring serta membandingkan setiap perangkat lunak Android versi orisinal dan versi refactoring dengan aspek yang diuji mencakup Fixed Detection Ratio (FDR), perubahan relatif, penggunaan CPU dan memori menggunakan pendekatan Design Research Methodology (DRM). Code smells yang diteliti mencakup Blocker, Critical, Major, Minor, HashMap Usage, Member Ignoring Method, dan Slow Loop. Hasil penelitian yang telah dilakukan membuktikan adanya penurunan intensitas code smells pada Calculator (60%), Todolist (71%), Openflood (93%) dan penurunan konsumsi penggunaan CPU yang signifikan pada Member Ignoring Method (-7,7%) dan Critical (-9,90%). Selain itu, penurunan konsumsi memori berdampak lebih signifikan pada setiap perangkat lunak versi refactoring tunggal maupun kumulatif. ----- Software has resource limitations, namely CPU and memory. Other research investigations have revealed that bad programming code can impact performance, resulting in increased CPU and memory consumption. Another survey has shown that users may uninstall software due to excessive performance issues (75.2%) resulting in the software crashes, and high memory consumption (42.6%). Poor programming code is caused by bad coding practices and implementation, leading to long-term software maintenance issues and negative impacts. Negative impacts indicate that ignoring rule violations, such as code smells caused by poor programming styles, lack of documentation, and high code complexity, can damage software maintenance. Therefore, a solution is needed to explore code smells using one of the ASATs named SonarQube, which is already used by 85,000 organizations, followed by single and cumulative code smell refactoring. This topic relates to software maintenance with the aim of analyzing code smells and refactoring, and comparing each Android software's original and refactored versions with aspects tested including Fixed Detection Ratio (FDR), relative change, CPU and memory usage using the Design Research Methodology (DRM) approach. The investigated code smells include Blocker, Critical, Major, Minor, HashMap Usage, Member Ignoring Method, and Slow Loop. The results of the conducted research prove a decrease in code smell intensity in Calculator (60%), Todolist (71%), and Openflood (93%), and significant decreases in CPU usage in Member Ignoring Method (-7.7%) and Critical (-9.90%). In addition, the decrease in memory consumption has a more significant impact on each software's single and cumulative refactored versions

    Investigating the Correlation between Performance Scores and Energy Consumption of Mobile Web Apps

    Get PDF
    Context. Developers have access to tools like Google Lighthouse to assess the performance of web apps and to guide the adoption of development best practices. However, when it comes to energy consumption of mobile web apps, these tools seem to be lacking. Goal. This study investigates on the correlation between the performance scores produced by Lighthouse and the energy consumption of mobile web apps. Method. We design and conduct an empirical experiment where 21 real mobile web apps are (i) analyzed via the Lighthouse performance analysis tool and (ii) measured on an Android device running a software-based energy profiler. Then, we statistically assess how energy consumption correlates with the obtained performance scores and carry out an effect size estimation. Results. We discover a statistically significant negative correlation between performance scores and the energy consumption of mobile web apps (with medium to large effect sizes), implying that an increase of the performance score tend to lead to a decrease of energy consumption. Conclusions. We recommend developers to strive to improve the performance level of their mobile web apps, as this can also have a positive impact on their energy consumption on Android devices

    Reducing energy usage in resource-intensive Java-based scientific applications via micro-benchmark based code refactorings

    Get PDF
    In-silico research has grown considerably. Today's scientific code involves long-running computer simulations and hence powerful computing infrastructures are needed. Traditionally, research in high-performance computing has focused on executing code as fast as possible, while energy has been recently recognized as another goal to consider. Yet, energy-driven research has mostly focused on the hardware and middleware layers, but few efforts target the application level, where many energy-aware optimizations are possible. We revisit a catalog of Java primitives commonly used in OO scientific programming, or micro-benchmarks, to identify energy-friendly versions of the same primitive. We then apply the micro-benchmarks to classical scientific application kernels and machine learning algorithms for both single-thread and multi-thread implementations on a server. Energy usage reductions at the micro-benchmark level are substantial, while for applications obtained reductions range from 3.90% to 99.18%.Fil: Longo, Mathias. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Tandil. Instituto Superior de Ingeniería del Software. Universidad Nacional del Centro de la Provincia de Buenos Aires. Instituto Superior de Ingeniería del Software; Argentina. University of Southern California; Estados UnidosFil: Rodriguez, Ana Virginia. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Tandil. Instituto Superior de Ingeniería del Software. Universidad Nacional del Centro de la Provincia de Buenos Aires. Instituto Superior de Ingeniería del Software; ArgentinaFil: Mateos Diaz, Cristian Maximiliano. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Tandil. Instituto Superior de Ingeniería del Software. Universidad Nacional del Centro de la Provincia de Buenos Aires. Instituto Superior de Ingeniería del Software; ArgentinaFil: Zunino Suarez, Alejandro Octavio. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Tandil. Instituto Superior de Ingeniería del Software. Universidad Nacional del Centro de la Provincia de Buenos Aires. Instituto Superior de Ingeniería del Software; Argentin

    Energy-aware Software

    Get PDF
    Luca Ardito has focused his PhD on studying how to identify and to reduce the energy consumption caused by software. The project concentrates on the application level, with an experimental approach to discover and modify characteristics that waste energy. We can define five research goals: RG1. Is it possible to measure the energy consumption of an application? Measuring the energy consumption of an electronic device (PC, mobile phone, etc.) is straightforward, but several applications coexist on it, possibly with very different energy needs. Usage profiles for applications are certainly important too. We will consider the most common platforms (Windows, Linux, Mac Osx). RG2. Could Energy Efficiency be considered as a software non- functional requirement? Research has increasingly focused on improving the Energy Efficiency of hardware, but the literature still lacks in quantifying accurately the energy impact of software. This research goal is strictly related to the following one. RG3. Is it possible to profile the energy consumption of a software application? An empirical experiment could assess quantitatively the energetic impact of software usage by building up common application usage scenarios and executing them independently to collect power consumption data. RG4. Is there a relationship between the way a program is written and its energy consumption? The same application, at the code level, can be written in different ways. Here the question is if the different ways have impact on energy consumption. The code should be considered at two levels: source code (programmer) and object code/byte code (compiler). RG5. Is it possible to use the energy consumption information to trigger self-adaptation? A software application could automatically modify its behaviour in order to reduce its energy consumption

    On the Survival of Android Code Smells in the Wild

    Get PDF
    International audienceThe success of smartphones and app stores have contributed to the explosion of the number of mobile apps proposed to end-users. In this very competitive market, developers are rushed to regularly release new versions of their apps in order to retain users. Under such pressure, app developers may be tempted to adopt bad design or implementation choices, leading to the introduction of code smells. Mobile-specific code smells represent a real concern in mobile software engineering. Many studies have proposed tools to automatically detect their presence and quantify their impact on performance. However, there remains—so far—no evidence about the lifespan of these code smells in the history of mobile apps. In this paper, we present the first large-scale empirical study that investigates the survival of Android code smells. This study covers 8 types of Android code smells, 324 Android apps, 255k commits, and the history of 180k code smell instances. Our study reports that while in terms of time Android code smells can remain in the codebase for years before being removed, it only takes 34 effective commits to remove 75% of them. Also, Android code smells disappear faster in bigger projects with higher releasing trends. Finally, we observed that code smells that are detected and prioritised by linters tend to disappear before other code smells
    corecore