Skip to content

[METRICS] 指標收集可能造成 busy waiting #1834

@chinghongfang

Description

@chinghongfang

Related to #1833

在 PR #1833 中,receiver timeout 設定為零,不再等待 metric 收集。目的是不讓 receiver 之間不要彼此等候。

但是這樣的作法,當所有 receiver 都沒有 metric 時,這隻線程會不斷嘗試執行每個 receiver,形成 busy waiting,浪費計算資源。或許應該判斷當所有 receiver 都沒有 metric 時,等待 metric 可取得 (也許下一次迴圈便會設定 timeout, block 在其中一個 receiver 上)。

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