Skip to content

Commit

Permalink
Clarify specification of startValue in speedscope file format (jlfwon…
Browse files Browse the repository at this point in the history
…g#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.
  • Loading branch information
tom93 authored Feb 5, 2024
1 parent 68fd88c commit 0121cf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/file-format-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0121cf9

Please sign in to comment.