Curtailment: report curtailed percent instead of bool (#32010)
This commit is contained in:
parent
435ed72a56
commit
608aa36629
19 changed files with 178 additions and 56 deletions
|
|
@ -441,8 +441,9 @@ func testInstance(ctx context.Context, instance any) map[string]testResult {
|
|||
wg.Go(func() {
|
||||
if dev, ok := api.Cap[api.Curtailer](instance); ok {
|
||||
makeResult("curtailable", true, nil)
|
||||
if val, err := dev.Curtailed(); err != nil || val {
|
||||
makeResult("curtailed", true, err)
|
||||
// only reported while actually curtailing
|
||||
if val, err := dev.CurtailedPercent(); err != nil || val < 100 {
|
||||
makeResult("curtailed", val, err)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue