Skip to content

[BUG]System Guard flow control | CPU thredshold| 系统自适应流控|以CPU作为阈值场景下的取值范围问题 #539

@sunyucheng

Description

@sunyucheng

背景:
我在测试使用CPU作为阈值的系统自适应流控方案。
问题:
1、在 func IsValidSystemRule(rule *Rule) error中校验的 cpu取值范围为0.0~1.0。但是在实际测试中发现func getProcessCpuStat() (float64, error)函数的实际返回值大小为0.0~100.0。导致在注册规则时因阈值非法invalid CPU usage, valid range is [0.0, 1.0]而失败。
该处是否应该修改一下cpu的合法性校验范围。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions