alibaba/sentinel-golang

[BUG] getProcessCpuStat return value (in percentage) breaks compatibility

Aperta

#435 aperta il 10 nov 2021

 (0 commenti) (1 reazione) (0 assegnatari)Go (453 fork)github user discovery
area/metricsgood first issuekind/bug

Metriche repository

Star
 (2957 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Issue Description

Type: bug report

Describe what happened

getProcessCpuStat return value (in percentage) breaks compatibility. In previous implementation, the CPU usage representation is the value between [0.0, 1.0]. Since 1.0.x, the CPU usage from getProcessCpuStat was changed to percentage value (i.e. 0-100), which breaks compatibility and affects system adaptive rules.

Describe what you expected to happen

getProcessCpuStat keeps compatibility and unifys the CPU usage value to [0.0, 1.0]

Tell us your environment

Sentinel Go v1.0.3

Guida contributor