diff --git a/manifests/examples/pipelines/pipeline-with-mocks.yml b/manifests/examples/pipelines/pipeline-with-mocks.yml index 9e4292f51..fa681a918 100644 --- a/manifests/examples/pipelines/pipeline-with-mocks.yml +++ b/manifests/examples/pipelines/pipeline-with-mocks.yml @@ -13,19 +13,36 @@ initialize: method: MockObservations path: "builtin" global-config: - timestamp-from: 2023-07-06T00:00 - timestamp-to: 2023-07-06T00:10 + timestamp-from: 2023-12-12T00:00 + timestamp-to: 2023-12-12T00:10 duration: 60 components: - cloud/instance-type: A1 generators: common: cloud/region: uk-west - common-key: common-val randint: cpu/utilization: min: 1 max: 99 + parameter-metadata: + inputs: + timestamp: + description: refers to the time of occurrence of the input + unit: RFC3339 + aggregationMethod: none + duration: + description: refers to the duration of the input + unit: seconds + aggregationMethod: sum + cloud/instance-type: + description: type of Cloud Instance name used in the cloud provider APIs + unit: none + aggregationMethod: none + cloud/region: + description: region cloud instance + unit: none + aggregationMethod: none "interpolate": method: Interpolation path: "builtin" @@ -35,12 +52,34 @@ initialize: y: [0.12, 0.32, 0.75, 1.02] input-parameter: "cpu/utilization" output-parameter: "cpu-factor" + parameter-metadata: + inputs: + cpu/utilization: + description: refers to CPU utilization. + unit: percentage + aggregationMethod: avg + outputs: + cpu-factor: + description: result of interpolate + unit: kWh + aggregationMethod: avg "cpu-factor-to-wattage": method: Multiply path: builtin global-config: input-parameters: ["cpu-factor", "cpu/thermal-design-power"] output-parameter: "cpu-wattage" + parameter-metadata: + inputs: + cpu/thermal-design-power: + description: thermal design power for a processor + unit: kwh + aggregationMethod: avg + outputs: + cpu-wattage: + description: the energy used by the CPU + unit: kwh + aggregationMethod: sum "wattage-times-duration": method: Multiply path: builtin @@ -61,6 +100,16 @@ initialize: numerator: vcpus-total denominator: vcpus-allocated output: vcpu-ratio + parameter-metadata: + inputs: + vcpus-total: + description: total number of vcpus available on a particular resource + unit: count + aggregationMethod: none + vcpus-allocated: + description: number of vcpus allocated to particular resource + unit: count + aggregationMethod: none "correct-cpu-energy-for-vcpu-ratio": method: Divide path: "builtin" @@ -77,6 +126,12 @@ initialize: global-config: input-parameters: ["cpu-energy-kwh", "grid/carbon-intensity"] output-parameter: "carbon-operational" + parameter-metadata: + inputs: + grid/carbon-intensity: + description: Carbon intensity for the grid + unit: gCO2eq/kWh + aggregationMethod: avg "sum-carbon": path: "builtin" method: Sum @@ -90,6 +145,12 @@ initialize: method: Sci global-config: functional-unit: "requests" + parameter-metadata: + inputs: + requests: + description: expressed the final SCI value + unit: none + aggregationMethod: sum "time-sync": method: TimeSync path: "builtin" @@ -98,6 +159,12 @@ initialize: end-time: "2023-12-12T00:01:00.000Z" interval: 5 allow-padding: true + parameter-metadata: + inputs: + time-reserved: + description: time reserved for a component + unit: seconds + aggregationMethod: avg "group-by": path: builtin method: GroupBy @@ -105,6 +172,7 @@ tree: children: child-1: pipeline: + - mock-observations - interpolate - cpu-factor-to-wattage - wattage-times-duration @@ -156,6 +224,7 @@ tree: requests: 50 child-2: pipeline: + - mock-observations - interpolate - cpu-factor-to-wattage - wattage-times-duration diff --git a/manifests/outputs/pipelines/mock-obs-time-sync.yaml b/manifests/outputs/pipelines/mock-obs-time-sync.yaml index c22a14c3e..11d8b6c34 100644 --- a/manifests/outputs/pipelines/mock-obs-time-sync.yaml +++ b/manifests/outputs/pipelines/mock-obs-time-sync.yaml @@ -7,19 +7,36 @@ initialize: path: builtin method: MockObservations global-config: - timestamp-from: 2023-07-06T00:00 - timestamp-to: 2023-07-06T00:10 + timestamp-from: 2023-12-12T00:00 + timestamp-to: 2023-12-12T00:10 duration: 60 components: - cloud/instance-type: A1 generators: common: cloud/region: uk-west - common-key: common-val randint: cpu/utilization: min: 1 max: 99 + parameter-metadata: + inputs: + timestamp: + description: refers to the time of occurrence of the input + unit: RFC3339 + aggregationMethod: none + duration: + description: refers to the duration of the input + unit: seconds + aggregationMethod: sum + cloud/instance-type: + description: type of Cloud Instance name used in the cloud provider APIs + unit: none + aggregationMethod: none + cloud/region: + description: region cloud instance + unit: none + aggregationMethod: none interpolate: path: builtin method: Interpolation @@ -37,6 +54,12 @@ initialize: - 1.02 input-parameter: cpu/utilization output-parameter: cpu-factor + parameter-metadata: + inputs: + cpu/utilization: + description: refers to CPU utilization. + unit: percentage + aggregationMethod: avg cpu-factor-to-wattage: path: builtin method: Multiply @@ -45,6 +68,12 @@ initialize: - cpu-factor - cpu/thermal-design-power output-parameter: cpu-wattage + parameter-metadata: + inputs: + cpu/thermal-design-power: + description: thermal design power for a processor + unit: kwh + aggregationMethod: avg wattage-times-duration: path: builtin method: Multiply @@ -67,6 +96,16 @@ initialize: numerator: vcpus-total denominator: vcpus-allocated output: vcpu-ratio + parameter-metadata: + inputs: + vcpus-total: + description: total number of vcpus available on a particular resource + unit: count + aggregationMethod: none + vcpus-allocated: + description: number of vcpus allocated to particular resource + unit: count + aggregationMethod: none correct-cpu-energy-for-vcpu-ratio: path: builtin method: Divide @@ -100,7 +139,6 @@ execution: - "@commitlint/cli@18.6.0" - "@commitlint/config-conventional@18.6.0" - "@grnsft/if-core@0.0.10" - - "@jest/globals@29.7.0" - "@types/jest@29.5.8" - "@types/js-yaml@4.0.9" @@ -131,6 +169,7 @@ tree: children: child-1: pipeline: + - mock-observations - interpolate - cpu-factor-to-wattage - wattage-times-duration