Closed da-ekchajzer closed 2 years ago
I have made an implementation in a general case. Any dict attribute of any type of component will be treated recursively.
Example for Workload
Input :
"workload": {
"10": {
"time": 0.1
},
"50": {
"time": 0.1
},
"100": {
"time": 0.7
},
"idle": {
"time": 0.1
}
}
Completed Input :
"workload": {
"10": {
"time": 0.1,
"power" :0.6
},
"50": {
"time": 0.1,
"power": 0.7235
},
"100": {
"time": 0.7,
"power": 1
},
"idle": {
"time": 0.1,
"power": 0.02
}
}
Verbose :
"workload": {
"10": {
"time": {
"input_value": 0.1,
"used_value": 0.1,
"status": "UNCHANGED"
},
"power": {
"input_value": null,
"used_value": 0.6,
"status": "SET"
}
},
"50": {
"time": {
"input_value": 0.1,
"used_value": 0.1,
"status": "UNCHANGED"
},
"power": {
"input_value": null,
"used_value": 0.7235,
"status": "SET"
}
},
"100": {
"time": {
"input_value": 0.7,
"used_value": 0.7,
"status": "UNCHANGED"
},
"power": {
"input_value": null,
"used_value": 1,
"status": "SET"
}
},
"idle": {
"time": {
"input_value": 0.1,
"used_value": 0.1,
"status": "UNCHANGED"
},
"power": {
"input_value": null,
"used_value": 0.02,
"status": "SET"
}
}
}
Bug description
Usage components are not treated in the verbose service.
To Reproduce
Any request on a device with
verbose = true
won't return any information on usage components.Expected behavior
The verbose service should treat usage component like any other components.
/!\ Usage components has attribute of dict type, a recursive function must be applied to handle embedded attributes.