EnterpriseDB / system_stats

A Postgres extension for exposing system metrics such as CPU, memory and disk information
Other
111 stars 24 forks source link

Redundant logic. #15

Closed xianglin1998 closed 9 months ago

xianglin1998 commented 9 months ago

Is it normal to set the value of MaxClockSpeed to l2cache? Although l2cache was set correctly afterwards.

https://github.com/EnterpriseDB/system_stats/blob/18033e7b4c3553ba655ada855ff029c4e01bbab3/windows/cpu_info.c#L136

neel5481 commented 9 months ago

yes, you are right, MaxClockSpeed is already getting read before L2CacheSize so removed the redundant code. Here is the PR ( https://github.com/EnterpriseDB/system_stats/pull/20 )

xianglin1998 commented 9 months ago

Perfect, thank you.