<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shaiful Alam Chowdhury on Medium]]></title>
        <description><![CDATA[Stories by Shaiful Alam Chowdhury on Medium]]></description>
        <link>https://medium.com/@shaiful_cs?source=rss-54474c82f84c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4e8Iou7ZCnXslNCUvxvxIw.jpeg</url>
            <title>Stories by Shaiful Alam Chowdhury on Medium</title>
            <link>https://medium.com/@shaiful_cs?source=rss-54474c82f84c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:33:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shaiful_cs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GreenScaler: Estimating software energy consumption from a model built with automatic test…]]></title>
            <link>https://medium.com/@shaiful_cs/greenscaler-estimating-software-energy-consumption-from-a-model-built-with-automatic-test-71786600557f?source=rss-54474c82f84c------2</link>
            <guid isPermaLink="false">https://medium.com/p/71786600557f</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[energy-software]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[energy-estimation]]></category>
            <dc:creator><![CDATA[Shaiful Alam Chowdhury]]></dc:creator>
            <pubDate>Tue, 18 Sep 2018 15:58:22 GMT</pubDate>
            <atom:updated>2018-09-18T15:59:03.543Z</atom:updated>
            <content:encoded><![CDATA[<h3>GreenScaler: Estimating software energy consumption from a model built with automatic test generation — Android as the case study.</h3><p>I know what you are thinking! What exactly is software energy consumption? Isn’t it the hardware components like CPU, Wi-Fi etc., that actually consume energy? You are right. But you also agree that it’s a software that drives those components, right? Thus the energy consumed by a hardware component might vary based on the software that accesses and utilizes it — efficiently or inefficiently. Consider the pseudo-code in Figure 1 and 2. Both solve the same problem — download 1000 images and process all the images. In the first case, each image is processed immediately after the download. In the second case, all the 1000 images are downloaded first and then processed together in a batch. Now will it shock you if I tell the second one is significantly (read very significantly) more energy efficient than the first one? Guess what? You are not the first one to be surprised. I asked this question in one of my presentations in front of undergrad and grad students including few professors. Interestingly, we got a 50–50 split among those tried to make a guess. I was not surprised by the way, specially after reading these two excellent survey papers by Candy et al. and Manotas et al. [2–3]. These two papers reveal that software energy efficiency is a relatively foreign idea to the practitioners.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*m9k58WKI2_xhRmqS_fAH3g.png" /><figcaption>Figure 1: Energy inefficient code that suffers from tail energy of the network interface card.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*H2r6P7Hfuochid1wF0QLhA.png" /><figcaption>Figure 2: Energy efficient code that does not suffer from tail energy</figcaption></figure><p>In spite of the lack of knowledge, developers (mostly for data centers and mobile apps) now realize that they need to learn and address this non-functional requirement. “ any watt that we can save is either a watt we don’t have to pay for, or it’s a watt that we can send to another server” [3]. On the other hand, mobile users prioritize longer battery life more than any other non-functional features [4], which compels app developers to consider app energy efficiency now more than ever [5–6].</p><p>The first impediment towards developing energy friendly applications is to know the actual energy consumption (consider the cases for figure 1 and 2 for example). Energy measurement requires tools that are not only expensive and time consuming to develop, but demand expertise as well — a far cry from what most of the software developers have even today. Among different energy related topics such as energy optimization, software developers mostly suffer from the measurement related issues [5].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KHCQC-L0_2QxeiLS0Libog.jpeg" /><figcaption>Figure 3: <a href="https://dl.acm.org/citation.cfm?id=2597097">GreenMiner: A hardware based mining software repositories software energy consumption framework</a></figcaption></figure><p>The above picture depicts GreenMiner, one of the popular hardware-based energy measurement systems for Android apps. Developers can use such systems for measuring their apps’ energy consumption. And again, developing something like GreenMiner is very difficult and expensive. One obvious solution would be to develop a completely software-based solution, that estimates software energy consumption, instead of actual measurements. The problem is that an approach developed for one Android phone might not work for other Android phones.</p><p>Motivated by such limitations, our objective was to build a machine learning based energy estimation model that uses common OS statistics — available on all Linux systems directly — as the independent variables. But to build a model, we need measurements — OS statistics for different scenarios (independent variables) and energy consumption for those scenarios (dependent variable). So we collected 24 different Android apps from different domains. Then we wrote a single test case for each of the apps. For example, in order to create a to do list for the Temaki application, a test script was required that can create a new list, enter some entries to the list and then delete the completed entries. This test case was used to drive the Temaki app for collecting the OS statistics and energy consumption. In order to enlarge the training set size, we also added different versions of those 24 apps. The model was named GreenOracle and was published as “GreenOracle: Estimating Software Energy Consumption with Energy Measurement Corpora” in proceedings of the 13th International Conference on Mining Software Repositories.</p><p>There was an interesting observation that adding versions of the same app did not improve the accuracy of GreenOracle significantly. Rather, the accuracy was improved with the addition of new apps. Unfortunately, it is infeasible to write a test script (manually) for each of the new app we add. This way, it would be unrealistic to build a software energy estimation model trained on hundreds of apps. That led us to consider the impact of automated test generation for building accurate software energy models.</p><p>We found that random test generation, with test selection heuristics, can produce test cases that are good enough for building robust software energy estimation models. We named that model GreenScaler, and published our research in Empirical Software Engineering Journal, titled “GreenScaler: training software energy models with automatic test generation” [7]. The contribution can be summarized as follows.</p><ol><li>Code coverage is not a good test selection heuristic for producing/selecting tests to build software energy models.</li><li>A simple CPU-utilization based heuristic performs as good as a complex model based heuristic for producing energy model building tests.</li><li>Except few extreme cases with ~15% error, GreenScaler exhibits an upper error bound of 10% in estimating Android apps’ energy consumption.</li><li>GreenScaler is accurate in detecting energy regression between versions of the same app, which would be extremely helpful for app developers.</li><li>GreenScaler data and tool are shared publicly. One can use the GreenScaler tool directly to estimate energy consumption of any Android app for a given test script.</li></ol><p>Please consider reading the full GreenScaler paper [7].</p><p>References:</p><p>[1] A. Hindle, A. Wilson, K. Rasmussen, E. J. Barlow, J. C. Campbell, and S. Romansky, “GreenMiner: A Hardware Based Mining Software Repositories Software Energy Consumption Framework,” in MSR 2014, (Hyderabad, India), pp. 12–21, May 2014.</p><p>[2] C. Pang, A. Hindle, B. Adams, and A. E. Hassan, “What do programmers know about the energy consumption of software?,” IEEE Software, pp. 83–89, 2015.</p><p>[3] I. Manotas, C. Bird, R. Zhang, D. Shepherd, C. Jaspan, C. Sadowski, L. Pollock, and J. Clause, “An empirical study of practitioners’ perspectives on green software engineering,” in Proceedings of the 38th International Conference on Software Engineering, ICSE ’16, pp. 237–248, 2016.</p><p>[4] V. Woollaston, “customers really want better battery life.” <a href="http://www.dailymail/">http://www.dailymail</a>.co.uk/sciencetech/article-2715860/, 2014. (last accessed: 2018-APR-22).</p><p>[5] G. Pinto, F. Castor, and Y. D. Liu, “Mining Questions About Software Energy Consumption,” in MSR 2014, pp. 22–31, 2014.</p><p>[6] H. Malik, P. Zhao, and M. Godfrey, “Going green: An exploratory analysis of energy-related questions,” in Proceedings of the 12th Working Conference on Mining Software Repositories, MSR ’15, pp. 418–421, 2015.</p><p>[7] Chowdhury, S., Borle, S., Romansky, S., Hindle, A. Empir Software Eng (2018). <a href="https://doi.org/10.1007/s10664-018-9640-7">https://doi.org/10.1007/s10664-018-9640-7</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71786600557f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>