The Trace-viewer tool currently loads the JSON file in 3 ways:
- When recording a new trace
- When loading the file via the load button after the file has been picked
- When dropping the file into the tab (drag & drop)
All of these do a one-time update to the active trace.
Look at the profiling_view and notice
tr.ui.b.readFile(file).then( ... this.setActiveTrace(file.name, data);
and a few variations on calls to setActiveTrace from beginRecording , onLoadClicked_ and dropHandler_ .
Yes, there are a few ways in which you can pass the json data to chrome://tracing (i.e. trace viewer) without manually clicking load data .
Depending on how much effort you want to put into it:
- Don't manually click load but drag and drop the file
- Automate the drag & drop (example with selenium) based on a script which watches for file changes to the JSON
- Automate the load based on file changes
- Contribute to Trace Viewer yourself and add this feature. See the tracing ecosystem explainer and contributing. Note it is now part of the Catapult project in GitHub.
See fswatch - a cross-platform file change monitor.