From 18ed9ce5a19dd00baad7f932dfefcffd1af5121d Mon Sep 17 00:00:00 2001
From: Kenneth Rohde Christiansen
- [=Data delivery=] from a [=platform collector=] can be activate and deactivated in an
+ [=Data delivery=] from a [=platform collector=] or [=mock platform collector=]
+ can be activate and deactivated in an
[=implementation-defined=] manner per [=source type=] and [=global object=].
+ The Compute Pressure API pose a challenge to test authors, as fully
+ exercising interface requires physical hardware devices that respond in predictable ways.
+
+ To address this challenge this document defines a [[WEBDRIVER2]] [=extension
+ commands=] that allows defining and controlling virtual pressure sources that behave
+ like real ones and which can have particular properties and whose readings can be
+ entirely defined by users.
+
+ A virtual pressure source simulates the behavior of a real pressure source in controlled ways.
+ It reports pressure changes to zero or more [=platform collectors=] connected to it.
+
+ Each [=virtual pressure source=] has:
+ Supporting algorithms
Data delivery
+ Automation
+
+
+ Virtual Pressure Source
+
+
+
+
+ A [=virtual pressure source=] is a string that represents a pressure source of a given [=source type=]. +
++ Each [=top-level traversable=] has a virtual pressure source mapping, which is an [=ordered map=] of + [=source types=] to [=virtual pressure source=]. +
++ A mock platform collector is a [=platform collector=] that uses data from the [=virtual pressure sources=] + in an [=implementation-defined=] manner. +
++ HTTP Method + | ++ [=extension command URI Template|URI Template=] + | +
---|---|
+ POST + | ++ /session/{session id}/pressuresource + | +
+ This [=extension command=] creates a new [=virtual pressure source=] of a certain + [=source type=]. Calls to {{PressureObserver/observe()}} from {{PressureObserver}} instances + of the same [=source type=] will cause this [=virtual pressure source=] to be used as their + backing pressure source until [[[#delete-virtual-pressure-source]]] is run. +
++ Parameter name + | ++ Value type + | ++ Required + | +
---|---|---|
+ type + | ++ String + | ++ yes + | +
+ The [=remote end steps=] given |session|, |URL variables| and |parameters| are: +
+null
.
+ + HTTP Method + | ++ [=extension command URI Template|URI Template=] + | +
---|---|
+ DELETE + | ++ /session/{session id}/pressuresource/{type} + | +
+ This [=extension command=] deletes a given [=source type=] of [=virtual pressure source=] and returns + pressure source updates back to hardware. +
++ The [=remote end steps=] given |session|, |URL variables| and |parameters| are: +
+null
.
+ + HTTP Method + | ++ [=extension command URI Template|URI Template=] + | +
---|---|
+ POST + | ++ /session/{session id}/pressuresource/{type} + | +
+ This [=extension command=] allows updating the state of a [=virtual pressure source=] by pushing + additional [=pending state updates=] and turning on and off reporting by setting the + [=sample update interval=]. +
++ Parameter name + | ++ Value type + | ++ Required + | +
---|---|---|
+ states + | ++ Array of strings + | ++ no + | +
+ sampleInterval + | ++ Number + | ++ no + | +
+ The [=remote end steps=] given |session|, |URL variables| and |parameters| are: +
+null
.
+ null
.
+ If a [=virtual pressure source=] exists, the [=supported source types=] is equal to the + [=source types=] [=map/keys=] in the [=virtual pressure source mapping=] [=ordered map=]. +
enum PressureSource { "thermals", "cpu" };@@ -1612,7 +1616,7 @@
- The Compute Pressure API pose a challenge to test authors, as fully + The Compute Pressure API poses a challenge to test authors, as fully exercising interface requires physical hardware devices that respond in predictable ways. To address this challenge this document defines a [[WEBDRIVER2]] [=extension @@ -1674,7 +1678,7 @@
- This [=extension command=] creates a new [=virtual pressure source=] of a certain + This [=extension command=] creates a new [=virtual pressure source=] of a specified [=source type=]. Calls to {{PressureObserver/observe()}} from {{PressureObserver}} instances of the same [=source type=] will cause this [=virtual pressure source=] to be used as their backing pressure source until [[[#delete-virtual-pressure-source]]] is run. @@ -1812,6 +1816,13 @@
+ sampleInterval + | ++ Number + | ++ yes + | +
+ samples + | ++ Array of strings + | ++ yes + | +
The [=remote end steps=] given |session|, |URL variables| and |parameters| are: @@ -1721,6 +1745,31 @@
null
.
@@ -1813,8 +1880,7 @@ This [=extension command=] allows updating the state of a [=virtual pressure source=] by pushing - additional [=pending state updates=] and turning on and off reporting by setting the - [=sample update interval=]. + additional [=pending samples=].
The reporting rate for a pressure observer is the rate at which it runs - the [=data delivery=] steps, and it will never exceed the [=sampling rate=]. + the [=data collection=] steps, and it will never exceed the [=sampling rate=].
The [=sampling rate=] differs from the [=requested sampling rate=] when the @@ -247,27 +247,18 @@
- The [=platform collector=] refers to an abstract platform interface, with which the [=user agent=] - interacts to obtain the telemetry readings required by this specification. + The [=platform collector=] refers to an abstract platform interface, with which the + [=user agent=] interacts to obtain the telemetry samples required by this specification.
- A [=platform collector=] can be defined by the underlying platform (e.g. in a native telemetry - framework) or by the [=user agent=] itself, if it has a direct access to hardware counters. -
-- A [=platform collector=] can support telemetry for different source types of computing - devices defined by {{PressureSource}}, or there can be multiple [=platform collectors=]. This is - [=implementation-defined=]. + For this specification's purposes, there is one separate [=platform collector=] per + [=global object=], which can support telemetry for different source types + defined by {{PressureSource}}.
From the implementation perspective it can be treated as a software proxy for the - corresponding hardware counters. It is possible to have multiple [=platform collector=] simultaneously - interacting with the same underlying hardware if the underlying platform supports it. -
-- In simple cases, a [=platform collector=] represents individual hardware counters, but if the provided - counter readings are a product of data fusion performed in software, the [=platform collector=] - represents the results of the data fusion process. This may happen in user space or in kernel space. + corresponding hardware counters or underlying telemetry framework, and it can make use + of data fusion with data from additional sources if that provides better results.
For automation purposes, a [=platform collector=] must have the ability to connect to @@ -371,7 +362,7 @@
- [=Data delivery=] from a [=platform collector=] can be activated and deactivated in an + [=Data collection=] from a [=platform collector=] can be activated and deactivated in an [=implementation-defined=] manner per [=source type=] and [=global object=].
- The data delivery steps that are run when the [=global object=] |relevantGlobal|'s - [=platform collector=] has new |data| available, and are as follows: + The data collection steps given |relevantGlobal| as input, is run when + the |relevantGlobal| associated [=platform collector=] needs to obtain new |data| + for a [=source type=] |source:PressureSource| and are as follows:
When a {{Document}} |document| is no longer [=Document/fully active=], - deactivate [=data delivery=] of data of all [=supported source types=] to |document|'s [=relevant global object=]. + deactivate [=data collection=] of data of all [=supported source types=] to |document|'s [=relevant global object=].
When a worker with associated {{WorkerGlobalScope}} |relevantGlobal| is no longer an active needed workers, - deactivate [=data delivery=] of data of all [=supported source types=] to |relevantGlobal|. + deactivate [=data collection=] of data of all [=supported source types=] to |relevantGlobal|.
When a {{Document}} |document| becomes [=Document/fully active=], for each non-[=list/empty=] [=registered observer list=] associated the [=source type=] |source|, - activate [=data delivery=] of |source| data to |document|'s [=relevant global object=]. + activate [=data collection=] of |source| data to |document|'s [=relevant global object=].
When a worker with associated {{WorkerGlobalScope}} |relevantGlobal| becomes an active needed workers, for each non-[=list/empty=] [=registered observer list=] associated the [=source type=] |source|, - activate [=data delivery=] of |source| data to |document|'s [=relevant global object=]. + activate [=data collection=] of |source| data to |document|'s [=relevant global object=].
When a worker with associated {{WorkerGlobalScope}} |relevantGlobal|, once |relevantGlobal|'s [=WorkerGlobalScope/closing=] flag is set to true, - deactivate [=data delivery=] for all [=supported source types=] to |relevantGlobal|. + deactivate [=data collection=] for all [=supported source types=] to |relevantGlobal|.
As one of the [=unloading document cleanup steps=] given {{Document}} |document|, - deactivate [=data delivery=] for all [=supported source types=] to |document|'s [=relevant global object=]. + deactivate [=data collection=] for all [=supported source types=] to |document|'s [=relevant global object=].
null
.
- If a [=virtual pressure source=] exists, the [=supported source types=] is equal to the - [=source types=] [=map/keys=] in the [=virtual pressure source mapping=] [=ordered map=]. -
enum PressureSource { "thermals", "cpu" };@@ -1098,10 +1094,10 @@
- The data collection steps given |relevantGlobal| as input, is run when + The data collection steps given |relevantGlobal| as input, are run when the |relevantGlobal| associated [=platform collector=] needs to obtain new |data| for a [=source type=] |source:PressureSource| and are as follows:
The [=remote end steps=] given |session|, |URL variables| and |parameters| are: @@ -1760,24 +1745,6 @@
- This [=extension command=] deletes a given [=source type=] of [=virtual pressure source=] and returns - pressure source updates back to hardware. + This [=extension command=] deletes a given [=source type=] of [=virtual pressure source=], meaning that, + if available, data will be delivered the regular way, by non-virtual means.
The [=remote end steps=] given |session|, |URL variables| and |parameters| are: @@ -1842,6 +1809,9 @@
null
.
@@ -1925,7 +1894,7 @@ The [=remote end steps=] given |session|, |URL variables| and |parameters| are: @@ -1753,13 +1744,6 @@
This [=extension command=] allows updating the state of a [=virtual pressure source=] by pushing - additional [=pending samples=]. + a new [=pending sample=].
From 16b08cdec753bab46196df160aab91b7629646d6 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costatags --- index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 90ccdb4..64a22d6 100644 --- a/index.html +++ b/index.html @@ -1947,8 +1947,10 @@
The Compute Pressure API poses a challenge to test authors, as fully - exercising interface requires physical hardware devices that respond in predictable ways. - + exercising interface requires physical hardware devices that respond in + predictable ways. +
+
To address this challenge this document defines a [[WEBDRIVER2]] [=extension
commands=] that allows defining and controlling virtual pressure sources that behave
like real ones and which can have particular properties and whose readings can be
From 93c826512ab023f87ab4ef048753dab403b16122 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa
predictable ways.
- To address this challenge this document defines a [[WEBDRIVER2]] [=extension + To address this challenge this document defines a [[!WEBDRIVER2]] [=extension commands=] that allows defining and controlling virtual pressure sources that behave like real ones and which can have particular properties and whose readings can be entirely defined by users. @@ -1991,7 +1991,7 @@
- As currently specified, the [[WEBDRIVER2]] integration and the + As currently specified, the [[!WEBDRIVER2]] integration and the [=extension commands=] below do not have an effect on shared workers.
@@ -2094,7 +2094,7 @@The [=remote end steps=] given |session|, |URL variables| and |parameters| are:
-The [=remote end steps=] given |session|, |URL variables| and |parameters| are:
-