Skip to content

Commit 3fb08b6

Browse files
committed
Update opt-trace-format.md
1 parent a7a05f6 commit 3fb08b6

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎v3/docs/opt-trace-format.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,19 @@ is that `trace.length` is the number of execution steps that the frontend render
125125

126126
Ok, still with me? Let's now dig into what an individual element in `trace` looks like.
127127

128+
## Interlude: Viewing a trace in the OPT frontend
129+
130+
To view a trace locally on your computer without setting up a Webserver, load up `v3/demo.html` in your browser.
131+
Now create a trace file called `v3/test-trace.js`, which contains a single trace variable like so:
132+
133+
```javascript
134+
var trace = { ... your trace object ... };
135+
```
136+
137+
Now reload `v3/demo.html`, and if everything works out, it will create a new visualization using the trace in the `trace`
138+
variable from `v3/test-trace.js`. I use this technique as a quick way of testing out what different traces look like
139+
without setting up a server.
140+
128141

129142
## Execution Point Objects
130143

0 commit comments

Comments
 (0)