1 research outputs found

    GreenSource: repository tailored for green software analysis

    Get PDF
    Dissertação de mestrado in Computer ScienceBoth energy consumption analysis and energy-aware development have gained the attention of both developers and researchers over the past years. The interest is more notorious due to the proliferation of mobile devices, where energy is a key concern. There is a gap identified in terms of tools and information to detect and identify anomalous energy consumption in Android applications. A large part of the existing tools are based on external hardware (costly solutions in terms of setup-time), through predictive models (requiring previous hardware calibration) or static code analysis methods. We could not identify so far a tool capable of monitor all relevant system resources and components that an application uses and appoint its energy consumption, while being easily integrated with the application and/or with its development environment. Due to the lack of a tool capable of gathering all this information, a natural consequence is the lack of information about the energy consumption of applications and factors that can influence it. This dissertation aims to carry out a study on the energy consumption of applications and mobile devices in the Android platform, having developed in this scope the GreenSource infrastructure, a repository containing the source code, representative metadata and metrics relatively to a large number of applications (and respective execution in physical devices). In order to gather the results, an auxiliary tool has been developed to automatize the process of testing and collect the respective results for each one of the applications. This tool is a software-based solution, allowing to obtain results in terms of consumption through executions made directly on a physical device running the Android platform. The developed framework, the AnaDroid, has the capability to perform static and dynamic analysis of an application, being able to monitor power consumption and usage of resources for each application through tests execution. This is done following a whitebox testing approach, in order to test applications at source code level. It invokes calls to the TrepnLib library at strategic locations of the application code (through instrumentation techniques) to gain control over relevant portions of the source code, like methods and unit tests. In this way the programmer can have results about the use, state and consumption of resources such as energy, CPU, GPU, memory, sensor usage and complexity of developed test cases. The information gathered through the use of the AnaDroid over a large set of applications was stored in GreenSource backend. With the collected results, we expect to be able to characterize and classify applications, as well the tests developed for it. It is intended that this will be made publicly available and serve as a reference for future works and studies.Quer a análise do consumo de energia, quer o desenvolvimento de aplicações com consciência neste sentido têm vindo a cativar a atenção de desenvolvedores e investigadores nos últimos anos. O interesse é mais notório devido à proliferação de dispositivos móveis, onde a energia é uma preocupação fundamental mas ainda pouco explorada. Como tal, existem lacunas identificadas em termos de ferramentas e informações para detectar e identificar o consumo anómalo de energia em aplicações Android. Grande parte das ferramentas existentes são baseadas em hardware externo (soluções dispendiosas em termos de tempo de setup), através de modelos preditivos (que exigem calibração prévia) ou métodos de análise estática de código. Não conseguimos identificar até ao momento uma ferramenta capaz de monitorizar de forma precisa todos os recursos e componentes relevantes do sistema usados por uma aplicação, bem como de determinar o seu consumo energético. Esta lacuna tem como consequência natural a falta de informação sobre o consumo de energia de aplicações e fatores que podem influenciá-lo. Esta dissertação tem como objetivo realizar um estudo sobre o consumo de energia na plataforma Android, tendo sido desenvolvido neste âmbito a infraestrutura GreenSource. Esta contém um repositório que engloba o código fonte, resultados e métricas relativas a um grande número de aplicações. A fim de obter resultados ilustrativos para um grande número de aplicações, foi desenvolvida uma ferramenta para automatizar o processo de teste e reunir os respectivos resultados. A ferramenta desenvolvida é baseada em software, permitindo obter resultados em termos de consumo através de execuções realizadas diretamente num dispositivo físico Android. Esta framework, denominada AnaDroid, possui a capacidade de analizar aplicações de forma estática e dinâmica, bem como de monitorizar o consumo e uso de recursos durante a sua execução. Para este efeito, são efetuadas invocações a uma biblioteca denominada TrepnLib, em locais estratégicos do código da aplicação para obter controlo sobre partes relevantes deste. Desta forma obtém-se resultados sobre o uso, estado e consumo de recursos, tais como consumo energético, CPU, GPU, memória, sensores. As informações reunidas através da execução do AnaDroid foram armazenadas na base de dados do GreenSource. Com todos os resultados coletados, pretende-se caracterizar e classificar energeticamente aplicações e testes desenvolvidos para estas. Pretende-se disponibilizar abertamente estes resultados, para que possam servir como referencia para futuros trabalhos, análises e estudos
    corecore