Code Monkey home page Code Monkey logo

tracarbon's Issues

Missing `return` statements for linux & windows

Environment

Tracarbon version: latest from pip

Environment:

  • OS: kubuntu

Bug

What happened:

File "/usr/local/lib/python3.10/dist-packages/tracarbon/hardwares/sensors.py", line 63, in from_platform
tracarbon.exceptions.TracarbonException: This platform Linux is not yet implemented.

How to reproduce it:

Launch tracarbon on linux (or windows).

More details:

The (simple) fix is to add a return here and here (hardwares/sensors.py, lines 61 & 63).

Add __main__.py for easier cli usage

Description

Python modules are not necessarily in path, so we may want to use python3 -m tracarbon run instead of tracarbon run.

This led to an error.

The actual way of running tracarbon with Python where installed modules are not on path is python3 -m tracarbon.cli.__init__.

The correct way of running a Python package is python3 -m [module_name] (see here an example on "why it's better" with pip).

If we create a __main__.py file at the root of the package, then Python will call it by default using only the name of the package.

Here's a small example:

$ mkdir a && nano a/__main__.py
$ cat a/__main__.py 
if __name__ == "__main__":
    print("Main!")
$ python3 a
Main!

There is an error in operation. I would like to ask you for help.

Hello, thank you for providing such an excellent project and code. I donโ€™t understand something and would like to ask you for advice. After configuring the api, I ran the command tracarbon run in the terminal but an error was displayed. I would like to ask you for advice on which one should be run. Does the program or what other parts of the program need to be changed before it can run?
error๏ผš
ValueError: could not convert string to float: ''

Create a file exporter

Description

Create a file exporter for Tracarbon.

Use Case
When Tracarbon is launched, it should be able to write everything to local files.

Private cloud (k8s)

Does tracarbon work in a cloud infrastructure? (private cloud) to measure my application's power consumption in my container?

Improve doc

I think the readme or the doc website is missing some explanation regarding the output of the program.

I think that tracarbon.hardware_memory_usage and tracarbon.hardware_cpu_usage are expressed in percentage?

What about tracarbon.co2_emission? What is the unit? Same for tracarbon.energy_consumption.

How to read the json file (or output to stdout)? Do we need to create a graph in order to see the consumption? Do we need to calculate a median or an average value?

Application-level tracking

Hello,
Is it possible for Tracarbon to track only my application's power consumption and carbon footprint or does it always measure the whole machine's power?
What if I have a container? Does that mean that if I have an application in that container, it will give me metrics only for my app?

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.