In the long run, the AverageSize method (i.e. your second variant) and the one based on current measurements (i.e. what my variant and your first variant do) will probably be very close to one another, because the averages generaly flatten over time. In the short and medium term though, they won't always match. Try this and you'll see:Alex88 wrote: ↑August 7th, 2020, 2:56 am[...] but at the end of the 120 updates all three variants were between the upper edge of 0.28X% to lower edge 0.30X% average CPU, say 0.01% to 0.02% fluctuation, no pattern or lean of any particular one that I could see.
Just checked again, Yin and my first config shows 0.11X%, the my second config shows about 0.17%, so assuming the 0.11% is fairly accurate, this simplest skin is we'll say up to 0.1% off, perfectly fine for the normal user or even an attentive skin author.
Code: Select all
[Variables]
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255
---Measures---
[MeasureCPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Name=Rainmeter
[MeasureGrossUpdates]
Measure=Calc
Formula=measureGrossUpdates + 1
[MeasureGrossCPU]
Measure=Calc
Formula=measureGrossCPU + measureCPU
[MeasureAverageCPU]
Measure=Calc
Formula=measureGrossCPU / measureGrossUpdates
[MeasureAverageSizeCPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Name=Rainmeter
AverageSize=[MeasureGrossUpdates]
DynamicVariables=1
---Meters---
[MeterComparison]
Meter=STRING
X=0
Y=0
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
Text="Update Number = [MeasureGrossUpdates]#CRLF#------------------#CRLF#Current Val = [MeasureCPU:2]#CRLF#------------------#CRLF#AverageCurr = [MeasureAverageCPU:2]#CRLF#AverageSize = [MeasureAverageSizeCPU:2]"
DynamicVariables=1
Bottom line is, AverageSize is perfectly fine and accurate on its own, if it's the only measurement displayed. If, however, one also displays the current measurements, the AverageSize measurement will NOT match the average of the current measurements, simply because it is based on its own internal measurements, which are different from the current measurements, since we talk about two DIFFERENT measures (i.e. [MeasureCPU] and [MeasureAverageSizeCPU]) which measure things at a couple of milliseconds time interval difference from one another. In that very short time interval difference, the CPU usage may or may not be very different, hence the difference in measurements.