Green-Software-Foundation / Green-Software-Foundation/if-plugins

Milliseconds in SCI Plugin (and others)

Open
#98 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
26
Forks
17
PR merge metrics
No merged PRs in 30d

Description

This might not be the best example, but I need support for millisecond precision in these plugins (like duration and functional-unit).

For instance, the duration parameter requires a number greater than or equal to 1, returning an error code too_small when I try to use something like 0.1 seconds. It’s a bit frustrating, as I'd like to handle smaller intervals, such as logging events at 100ms intervals.

A simple example would be handling 100ms interval logging from something like this in my green coding Hello World:
Amount of iterations UseCase is running: 10,000,000,000

Use case per iteration: increment sum by 1 for each iteration.

Total Joules 407 over 4829 ms
Average of 0.084 J/ms = 84 J/s or Watts
E: 0.00011299 kWh in SCI

Manfiest examples

name: sci
description: successful path
tags:
initialize:
outputs:
- yaml
plugins:
sci:
method: Sci
path: '@grnsft/if-plugins'
global-config:
functional-unit: request
functional-unit-time: '1 h'
tree:
children:
child:
pipeline:
compute:
- sci
inputs:
- timestamp: 2023-07-06T00:00
carbon: 0.0000062
duration: 1

Same here

name: sci-e-demo
description:
tags:
initialize:
outputs:
- yaml
plugins:
sci-e:
method: SciE
path: '@grnsft/if-plugins'
tree:
children:
child:
pipeline:
compute:
- sci-e
inputs:
- timestamp: 2023-08-06T00:00
duration: 3600
cpu/energy: 0.300
memory/energy: 0.04
network/energy: 0.004

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.