Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ <h3>
<p>
Each [=global object=] has:
<ul>
<li>
a <dfn>current pressure state</dfn> (a string), initialized to the empty string.
</li>
<li>
a <dfn>pressure observer task queued</dfn> (a boolean), which is initially false.
</li>
Expand Down Expand Up @@ -387,7 +390,7 @@ <h3>

<section> <h2>Contributing Factors</h2>
<p>
<dfn>Contributing factors</dfn> represents the factors contributing to the system performance and current [=pressure state=].
<dfn>Contributing factors</dfn> represents the factors contributing to the system performance and [=current pressure state=].
In case the [=pressure state=] is nominal or fair, the {{PressureRecord}} internal slot {{PressureRecord/[[Factors]]}}
will always be [=list/empty=].
</p>
Expand All @@ -413,6 +416,30 @@ <h3>
</li>
</ul>
</p>
<p>
The <dfn>change in contributing factors is substantial</dfn> steps are as follows:
<ol>
<li>
If [=implementation-defined=] low-level hardware metrics that contribute to the
system performance and [=current pressure state=] drop below or exceed an
[=implementation-defined=] threshold for the [=current pressure state=], return true.
</li>
<li>
Return false.
</li>
</ol>
<aside class="note">
The [=change in contributing factors is substantial=] algorithm allows user agents to avoid
flip-flopping between two states in certain circumstances. For example, a state might otherwise
Comment thread
anssiko marked this conversation as resolved.
change too rapidly in response to a certain system metric that fluctuates around a boundary
condition that triggers a state change. This specification does not define the precise algorithm
to allow implementations optimize this algorithm to match the underlying hardware platform's behavior.
One possible implementation of this algorithm is to use a
<a href="https://en.wikipedia.org/wiki/Preisach_model_of_hysteresis#Nonideal_relay">nonideal relay</a>
as a model and identify appropriate lower threshold &#945; and upper threshold &#946; for each
[=pressure state=] taking special characteristics of each [=contributing factor=] into consideration.
</aside>
</p>
</section>

<section> <h2>Pressure Observer</h2>
Expand Down Expand Up @@ -690,7 +717,7 @@ <h3>The <dfn>PressureRecord</dfn> interface</h3>
a <dfn>[[\Source]]</dfn> value of type {{PressureSource}}, which represents the current [=source type=].
</li>
<li>
a <dfn>[[\State]]</dfn> value of type {{PressureState}}, which represents the current [=pressure state=].
a <dfn>[[\State]]</dfn> value of type {{PressureState}}, which represents the [=current pressure state=].
</li>
<li>
a <dfn>[[\Factors]]</dfn>, which is [=ordered set=] of {{PressureFactor}} values,
Expand Down Expand Up @@ -916,7 +943,8 @@ <h3>Supporting algorithms</h3>
Let |record:PressureRecord| be |observer|.{{PressureObserver/[[LastRecordMap]]}}[|source|].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should really rename this to lastRecord, it just confused me.

</li>
<li>
If |record|.{{PressureRecord/[[State]]}} is not equal to |state|, return true.
If |record|.{{PressureRecord/[[State]]}} is not equal to |state| and [=change in contributing factors is substantial=]
Comment thread
anssiko marked this conversation as resolved.
returns true, return true.
</li>
<li>
If |record|.{{PressureRecord/[[Factors]]}} and |factors| are not [=set/supersets=] of each other, return true.
Expand Down