ijoules
Energy measurement of python code, in MacOS - Intel CPU-
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.4%) to scientific vocabulary
Keywords
Repository
Energy measurement of python code, in MacOS - Intel CPU-
Basic Info
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
Readme.md
Requirements
Install the Intel Power Gadget Tool In order to have access to the power measurements of the machine
install the python libraries pandas, and tabulate
Usage
Ijoules can be used in 3 different ways
Basic usage
``` Python
from ijoules import IJoules
def foo(): energymeter= IJoules() energymeter.configure() # ... energymeter.begin() # Code that we want to measure the nergy consumption energymeter.record("first part of the code ") # Another measurement energymeter.end() data = energymeter.report # a dataframe containing all the energy
```
Use it as a context
With the instruction with
``` Python
from ijoules import IJoules
def foo() : with Ijoules() as energymeter : # Work that we want to measure energymeter.record("First part of the work") # Second part of the work energy_meter.record("Second part of the work") # Second part of the work
# This will print the energies as a table
```
Use it as a decorator
``` Python
from ijoules import measureit
@measureit() def foo(): # Code that we want to measure
def main() foo() # This will print the energy of the function as a table ```
Example
| | pkgj | corej | dramj | durations | Tag | |:--:|:-------:|:--------:|:--------:|:------------:|:-----------:| | 1 | 13.5483 | 11.4319 | 0.408875 | 0.610369 | worker1 | | 2 | 13.5273 | 11.413 | 0.367126 | 0.60813 | second time | | 3 | 10.4964 | 3.47644 | 1.36255 | 2.00226 | end |
IJoules allow you to measure different parts of your CPU based on their availablity.
To know the available parts that can be measured you can call the methdoe get_available_domains
``` python
energymeter= IJoules() energymeter.configure() energymeter.getavailable_domains() ```
The possible domains (CPU parts) are :
- core : The energy consumption of the core units -in Joules-
- dram : The energy consumption of DRAM -in Joules-
- gpu : The energy consumption of intergated GPU -in Joules-
- pkg : The whole energy consumption of the whole CPU (Core+GPU+other parts) -in Joules-
The figure below will illustrate more those parts:

References : - https://blog.chih.me/read-cpu-power-with-RAPL.html - https://software.intel.com/content/www/us/en/develop/articles/intel-power-gadget.html
Owner
- Name: belgaid mohammed chakib
- Login: chakib-belgaid
- Kind: user
- Location: lille france
- Company: inria-lille
- Twitter: chakibmed
- Repositories: 69
- Profile: https://github.com/chakib-belgaid
Green Coder, Gamer, and technology enthousiaste, I am a PhD in computer carbonfoot prints, energy measurement and Software optimization
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: "Ijoules: Python library that measures python code in MacOS"
message: Make your python code green again
type: software
date-released: 2020-11-17
authors:
- given-names: Mohammed chakib
family-names: Belgaid
email: chakib.belgaid@gmail.com
orcid: 'https://orcid.org/0000-0002-5264-7426'
affiliation: Inria university of Lille
- given-names: Romain
family-names: Rouvoy
email: romain.rouvoy@inria.fr
affiliation: inria university of lille
orcid: 'https://orcid.org/0000-0003-1771-8791'
- orcid: 'https://orcid.org/0000-0003-0006-6088'
affiliation: 'Inria university of lille '
email: lionel.seinturier@univ-lille.fr
family-names: Seinturier
given-names: Lionel
identifiers:
- type: url
value: 'https://pyjoules.readthedocs.io'
repository-code: 'https://github.com/chakib-belgaid/IJoules'
url: 'http://powerapi.org/'
repository-artifact: 'https://github.com/chakib-belgaid/IJoules'
abstract: >-
A tool to measure the energy consumption of python in MacOS
GitHub Events
Total
Last Year
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Mohammed-Chakib Belgaid | m****d@u****r | 13 |
| belgaid mohammed chakib | c****d@g****m | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- pandas *
- tabulate *