perf: merge cpuCoreUsage/cpuCoreFreq/cpuCoreHistory into single cpuCores array
This commit is contained in:
parent
8fdd9692e6
commit
c8d71bd871
3 changed files with 25 additions and 34 deletions
|
|
@ -22,9 +22,7 @@ M.BarSection {
|
|||
}
|
||||
}
|
||||
|
||||
readonly property var _coreUsage: M.SystemStats.cpuCoreUsage
|
||||
readonly property var _coreFreq: M.SystemStats.cpuCoreFreq
|
||||
readonly property var _coreHistory: M.SystemStats.cpuCoreHistory
|
||||
readonly property var _cores: M.SystemStats.cpuCores
|
||||
readonly property var _coreMaxFreq: M.SystemStats.cpuCoreMaxFreq
|
||||
readonly property var _coreTypes: M.SystemStats.cpuCoreTypes
|
||||
|
||||
|
|
@ -114,14 +112,14 @@ M.BarSection {
|
|||
|
||||
// Per-core rows
|
||||
Repeater {
|
||||
model: root._coreUsage.length
|
||||
model: root._cores.length
|
||||
|
||||
delegate: Item {
|
||||
required property int index
|
||||
width: hoverPanel.contentWidth
|
||||
|
||||
readonly property int _u: root._coreUsage[index] ?? 0
|
||||
readonly property real _f: root._coreFreq[index] ?? 0
|
||||
readonly property int _u: root._cores[index]?.usage ?? 0
|
||||
readonly property real _f: root._cores[index]?.freq_ghz ?? 0
|
||||
readonly property color _barColor: root._loadColor(_u)
|
||||
readonly property bool _throttled: {
|
||||
const maxF = root._coreMaxFreq[index] ?? 0;
|
||||
|
|
@ -204,7 +202,7 @@ M.BarSection {
|
|||
width: 32
|
||||
height: 10
|
||||
|
||||
property var _hist: root._coreHistory[parent.parent.index] || []
|
||||
property var _hist: root._cores[parent.parent.index]?.history ?? []
|
||||
property color _col: parent.parent._barColor
|
||||
|
||||
on_HistChanged: if (root._showPanel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue