-
Notifications
You must be signed in to change notification settings - Fork 13
Add an implementation-defined change threshold exceeded check #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fd40e65
Add an implementation-defined change threshold exceeded check
anssiko 0f233f0
Clarify an implementation-defined change threshold exceeded check
anssiko 9a53041
Add a "change in contributing factors is substantial" check
anssiko 6ba8388
Add "current pressure state" internal slot
anssiko 0dcdf49
Define "meet their specific needs" better
anssiko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
@@ -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> | ||
|
|
@@ -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 | ||
| 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 α and upper threshold β for each | ||
| [=pressure state=] taking special characteristics of each [=contributing factor=] into consideration. | ||
| </aside> | ||
| </p> | ||
| </section> | ||
|
|
||
| <section> <h2>Pressure Observer</h2> | ||
|
|
@@ -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, | ||
|
|
@@ -916,7 +943,8 @@ <h3>Supporting algorithms</h3> | |
| Let |record:PressureRecord| be |observer|.{{PressureObserver/[[LastRecordMap]]}}[|source|]. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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=] | ||
|
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. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.