Clarify specification of startValue in speedscope file format (#464)

The previous description ("event values will be relative to this
startValue") was ambiguous.

Suppose the profile starts at wall time 1000ms and the first event is
at wall time 1003ms.

The intention is that startValue should be set to 1000 and the "at"
value of the event should be set to 1003. The viewer's time axis will
start at 0ms and the first event will be displayed at 3ms.

But the previous description could be incorrectly interpreted as
saying that the "at" value of the first event should be set to 3 (the
time relative to startValue, as opposed to the absolute wall time).

Clarify that "relative" is referring to how the viewer displays the
data, not about which values to store in the file.
This commit is contained in:
Tom Levy 2024-02-06 07:58:18 +13:00 committed by GitHub
parent 68fd88ceaf
commit 0121cf9342
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,7 +65,7 @@ export namespace FileFormat {
unit: ValueUnit
// The starting value of the profile. This will typically be a timestamp.
// All event values will be relative to this startValue.
// All event values will be displayed relative to this startValue.
startValue: number
// The final value of the profile. This will typically be a timestamp. This
@ -93,7 +93,7 @@ export namespace FileFormat {
unit: ValueUnit
// The starting value of the profile. This will typically be a timestamp.
// All event values will be relative to this startValue.
// All event values will be displayed relative to this startValue.
startValue: number
// The final value of the profile. This will typically be a timestamp. This