Green-Software-Foundation / if-plugins

Impact Framework models owned and maintained by the GSF
MIT License
25 stars 17 forks source link

Readme shows incorrect outputs(?) #65

Closed heaversm closed 7 months ago

heaversm commented 8 months ago

I believe the readme documentation lists the improper output of the cloud metadata plugin

Rationale

Shows:

An array containing:

cloud/instance-type: echo input instance-type
cloud/vendor: echo input vendor
physical-processor: physical processor used in the given instance
vcpus-allocated: number of vCPUs allocated to this instance
vcpus-total: total number of vCPUs available to this instance

Should show:

An array containing:

cpu/thermal-design-power: [your chosen description]
memory-available: [your chosen description]
physical-processor: physical processor used in the given instance
vcpus-allocated: number of vCPUs allocated to this instance
vcpus-total: total number of vCPUs available to this instance

based on what I see in this file

'vcpus-allocated': parseInt(instance['cpu-cores-utilized']),
'vcpus-total': parseInt(instance['cpu-cores-available']),
'memory-available': parseInt(instance['memory-available']),
'physical-processor': instance['cpu-model-name'],
'cpu/thermal-design-power': parseFloat(instance['cpu-tdp']),
jmcook1186 commented 8 months ago

Yes, with the following inputs:

- timestamp: 2023-07-06T00:01
  duration: 10
  cloud/vendor: aws
  cloud/instance-type: m5n.large

the plugin yields the following outputs:

            "timestamp": "2023-07-06T00:01",
            "duration": 10,
            "cloud/vendor": "aws",
            "cloud/instance-type": "m5n.large",
            "vcpus-allocated": 2,
            "vcpus-total": 96,
            "memory-available": 8,
            "physical-processor": "Intel® Xeon® Platinum 8259CL",
            "cpu/thermal-design-power": 210

I'll update the docs page.

jmcook1186 commented 7 months ago

Closing as complete