Files
MuditaOS/module-sys/SystemManager/doc/data/CpuFreqChangeAlgorithm.puml
GravisZro e433e8dd03 Fix transparent backgrounds in PlantUML
Images generated using PlantUML had transparent backgrounds which made
their text difficult to read on GitHub when using "Dark Mode". Forcing
a background color of #F0F0F0 ensures they are all readable.
2021-08-16 17:01:19 +02:00

42 lines
844 B
Plaintext

@startuml
skinparam BackgroundColor F0F0F0
start
if (cpuLoad > frequencyShiftUpperThreshold) then (yes)
: aboveThresholdCounter++
belowThresholdCounter = 0;
else (no)
if (cpuLoad < frequencyShiftLowerThreshold) then (yes)
: belowThresholdCounter++
aboveThresholdCounter = 0;
else (no)
: belowThresholdCounter = 0
aboveThresholdCounter = 0;
endif
endif
if (
aboveThresholdCounter >= maxAboveThresholdCount
or
minFrequencyRequested > currentCpuFrequency
) then (yes)
: IncreaseCpuFrequency()
belowThresholdCounter = 0
aboveThresholdCounter = 0;
else (no)
if (
belowThresholdCounter >= maxBelowThresholdCount
and
currentCpuFreq > minFrequencyRequested
) then (yes)
: DecreaseCpuFrequency()
belowThresholdCounter = 0
aboveThresholdCounter = 0;
endif
endif
stop
@enduml