take maximum processor Mhz (#16740)

* take maximum processor Mhz

* remove break

* cl: add cl for 16740

---------

Co-authored-by: Seth Hoenig <shoenig@duck.com>
This commit is contained in:
Georgy Buranov
2023-03-31 18:25:32 +02:00
committed by GitHub
parent 473135d5b1
commit 78c90c57c5
2 changed files with 6 additions and 2 deletions

3
.changelog/16740.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:improvement
client/fingerprint: detect fastest cpu core during cpu performance fallback
```

View File

@@ -63,8 +63,9 @@ func Init() error {
for _, infoStat := range cpuInfoStats {
cpuModelName = infoStat.ModelName
cpuPowerCoreMHz = uint64(infoStat.Mhz)
break
if uint64(infoStat.Mhz) > cpuPowerCoreMHz {
cpuPowerCoreMHz = uint64(infoStat.Mhz)
}
}
// compute ticks using only power core, until we add support for