w3c / compute-pressure

A web API proposal that provides information about available compute capacity
https://www.w3.org/TR/compute-pressure/
Other
69 stars 10 forks source link

Provide guidelines for mitigation algorithms #241

Closed arskama closed 11 months ago

arskama commented 11 months ago

This patch is providing guidelines on numerical values to select for the mitigation algorithms parameters. [1]

[1] https://github.com/w3c/compute-pressure/issues/197#issuecomment-1698413311

Fixes: #240


Preview | Diff

arskama commented 11 months ago

@rakuco

We do have some wpt tests for [[MaxChangesThreshold]] and [[PenaltyDuration]], checking that the random [[maxChangesThreshold]] number choosen is in the range and that penalty is happening during the [[PenaltyDuration]] range. These 2 internal slots could be normatives. If they become normative values, can we still keep all the comments around the values selections. (Based on implementation experience[...]. These values are subject to change[...])

the [[observationWindow]] is not as important, it is used to give more randomness to the process, so it can stay non-normative. About the break calibration, I believe that it can stay as a non-normative section as well.

rakuco commented 11 months ago

If they become normative values, can we still keep all the comments around the values selections. (Based on implementation experience[...]. These values are subject to change[...])

I think it's fine to define them normatively and have a note saying the values are based on implementation experience and are therefore subject to change. Changing the values in the future then becomes like any other normative change with user-visible effects, i.e. get buy-in from all implementers (not hard in this case yet since there's just one implementation) and adjust existing web tests.

arskama commented 11 months ago

lgtm, but I'd like to see @pes10k's feedback before merging

Yes, definitely!

pes10k commented 11 months ago

I think this approach sounds great, thank you for the work!

anssiko commented 11 months ago

Thank You @pes10k for helping us harden this specification further!