catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.91k stars 563 forks source link

Trace viewer embedding - typo in example docs? #4583

Closed dajaffe closed 5 years ago

dajaffe commented 5 years ago

I've gotten past the vulcanizing and am embedding the trace viewer in an empty html file per the example in embedding-trace-viewer.md. I'm seeing in the example something referring to 'result' for the TraceModel:

var model = new tr.Model();
var i = new tr.importer.Import(m);
var p = i.importTracesWithProgressDialog([result]);

Which of course leads to an undefined errror:

Uncaught ReferenceError: result is not defined at tracerviewer.html:18

What exactly should be passed into importTracesWithProgressDialog()?

dajaffe commented 5 years ago

Ah sorry, I looked at some other examples and I see that result will be the tracing data itself.