Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time sync doc, rename manifest keys #528

Merged
merged 3 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/manifests/basic-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ initialize:
path: "builtin"
method: GroupBy
cloud-metadata:
method: CloudInstanceMetadata
method: CloudMetadata
path: "@grnsft/if-plugins"
operational-carbon:
path: "@grnsft/if-plugins"
Expand Down
6 changes: 3 additions & 3 deletions examples/manifests/cim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ description: example impl invoking Cloud Instance Metadata plugin
tags:
initialize:
plugins:
cloud-instance-metadata:
method: CloudInstanceMetadata
cloud-metadata:
method: CloudMetadata
path: "@grnsft/if-plugins"
tree:
children:
child:
pipeline:
- cloud-instance-metadata
- cloud-metadata
config:
inputs:
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
Expand Down
12 changes: 6 additions & 6 deletions examples/manifests/group-by.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ tree:
duration: 300
cloud/instance-type: A1
region: uk-west
cpu-util: 99
cpu/utilization: 99
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: A1
region: uk-west
cpu-util: 23
cpu/utilization: 23
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: A1
region: uk-west
cpu-util: 12
cpu/utilization: 12
- timestamp: 2023-07-06T00:00 # note this time restarts at the start timstamp
duration: 300
cloud/instance-type: B1
region: uk-west
cpu-util: 11
cpu/utilization: 11
- timestamp: 2023-07-06T05:00
duration: 300
cloud/instance-type: B1
region: uk-west
cpu-util: 67
cpu/utilization: 67
- timestamp: 2023-07-06T10:00
duration: 300
cloud/instance-type: B1
region: uk-west
cpu-util: 1
cpu/utilization: 1
4 changes: 2 additions & 2 deletions src/__mocks__/fs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export const readFile = async (_filePath: string, _format: string) => {
inputs:
- timestamp: 2023-07-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
duration: 3600 # Secs
cpu-util: 18.392
cpu/utilization: 18.392
- timestamp: 2023-08-06T00:00 # [KEYWORD] [NO-SUBFIELDS] time when measurement occurred
duration: 3600 # Secs
cpu-util: 16`;
cpu/utilization: 16`;
};

export const mkdir = (dirPath: string, _object: any) => dirPath;
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/unit/lib/manifest/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export const manifest: Manifest = {
{
timestamp: '2023-07-06T00:00',
duration: 3600,
'cpu-util': 18.392,
'cpu/utilization': 18.392,
},
{
timestamp: '2023-08-06T00:00',
duration: 3600,
'cpu-util': 16,
'cpu/utilization': 16,
},
],
},
Expand Down
8 changes: 4 additions & 4 deletions src/__tests__/unit/lib/manifest/nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const manifestNested: Manifest = {
{
timestamp: '2023-07-06T00:00',
duration: 10,
'cpu-util': 50,
'cpu/utilization': 50,
'energy-network': 0.000811,
carbon: 10,
},
Expand All @@ -59,7 +59,7 @@ export const manifestNested: Manifest = {
{
timestamp: '2023-07-06T00:00',
duration: 10,
'cpu-util': 50,
'cpu/utilization': 50,
'energy-network': 0.000811,
carbon: 10,
},
Expand Down Expand Up @@ -114,7 +114,7 @@ export const manifestNestedNoConfig: Manifest = {
{
timestamp: '2023-07-06T00:00',
duration: 10,
'cpu-util': 50,
'cpu/utilization': 50,
'energy-network': 0.000811,
carbon: 10,
},
Expand All @@ -129,7 +129,7 @@ export const manifestNestedNoConfig: Manifest = {
{
timestamp: '2023-07-06T00:00',
duration: 10,
'cpu-util': 50,
'cpu/utilization': 50,
'energy-network': 0.000811,
carbon: 10,
},
Expand Down
Loading
Loading