Git Product home page Git Product logo

stefanos1316 / rosetta-code-research Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 68.21 MB

Exploiting Programming Languages Energy Consumption

Shell 2.78% C++ 10.46% C# 3.33% C 13.28% Ceylon 0.65% Clojure 3.32% COBOL 5.42% CoffeeScript 1.97% Common Lisp 6.62% D 11.68% E 1.71% ECL 0.20% Erlang 4.49% Factor 1.23% Forth 4.35% GAP 0.80% Go 11.61% Groovy 3.03% Haskell 8.03% Objective-J 5.05%
programming-language rosetta dataset energy-consumption

rosetta-code-research's Introduction

Authors information

Name: Stefanos Georgiou

Affiliation: Athens University of Business and Economics

Contact details: [email protected], [email protected], and [email protected]

Description

This reposotory was build for research purpose. Our aim is to compare the energy consumption of different tasks writtern in a variety of programming languages. In order to achieve our aim we used a dataset publicly available from Rosetta Code. We found all the collected tasks implemented in different langauges from a Git repo. Since Rosetta Code contains the amount of 655 programming languages we decicde to limit our scope and include only the most used ones.
To this line, we collected the 14 most used languages found from tiobe index June 2017. Thus, we developed a number of bash scripts to manage our dataset, compile, execute, and plot results out of the collected tasks.

Downloading

Since we are using a submodule in this repository we suggest the use of the following command:

  $ git clone --recursive https://github.com/stefanos1316/Rosetta-Code-Research.git

In case you used simple clone command, add the submdodules using the following commands inside the cloned repo.

  $ git submodule init

  $ git submodule update

How to Execute

First browse to Scripts directory and proceed as follows:

  1. Execute the script.cleanAll in order to prepare the existing dataset and make it case insensitive by chaning all files from upper to lower case.
  2. Execute the script.createNewDataSet to have a filtered dataset with all the selected tasks and programming languages that we will examine for this research.
  3. Some of the Tasks cotains more that one implementation of the same languages, thus we had to manually drive through the directories and remove some of the executables. In the case of Java we also had to change the .java files name since it had more than one file of a selected task.
  4. Afterwards, we had to add additional code inside each file in order to force a task to run around a million of times (some tasks are so small and are finishing faster than 1 second, thus our power analyzer cannot capture those results).
  5. Execute the script.compileTasks in order to compile all tasks.
  6. Execute the script.executeTasks[Remotly|Locally] in order to execute the tasks and collect results (in our case we used Watts Up Pro). On running the script.executeTasksRemotly, it is necessary to have a remote host with ssh where the Watts Up Pro is connected, otherwise the script.executeTasksLocally can be executed without the need of the remote host.
  7. Execute the script.createPlottableData that creates the file with all the results from all the measurements (Energy/Performance). In the end, this script will call the script.plotGrpahs that is responsible to create plot the graphs.
  8. The script.plotGraphs is executed by the script.createPlottableData and can provide graphs for both performance and energy consumption. Moreover, there are some default setting found in the end of script.createPlottableData, if anyone would like to change them and plot using different configuration parameters.

Note: For more information for executing scripts add the --help command line argument.

rosetta-code-research's People

Contributors

mkechagia avatar stefanos1316 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rosetta-code-research's Issues

Plot Graphs

Develop a script that receives a file with results and plots a graph.

Script to turn off daemons

Write a script that turns off unnecessary background daemons and maybe some of the hardware components which are not necessary.

Close unnecessary process

Write a script that shutdowns unnecessary daemons and processes that may pollute our measurements.

Compiling rust

The script.compileTasks for rust used the absolute with where the rustc is located in Stefanos PC, make sure to change it and set it as an environmental variable in your Unix system

Url-decode Rust

The above task is pending, install the proper libraries and try again from home

Tasks' list

Upload a list that has all the tasks that we are going to use for this research

Check PL installations

Implement a script that will check in the necessary programming languages are installed properly if not the script can suggest websites for installing them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.