aboutsummaryrefslogtreecommitdiff
path: root/init.js
blob: 357afde7fa51b92870239bdef0f92bfcd405e922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function onLoad() {
  reload();
}

function reload() {
  if (!linuxPerfData)
    return;

  var m = new tracing.TimelineModel();
  m.importEvents("[]", true, [linuxPerfData]);

  var timelineViewEl = document.querySelector('.view');
  cr.ui.decorate(timelineViewEl, tracing.TimelineView);
  timelineViewEl.model = m;
  timelineViewEl.tabIndex = 1;
  timelineViewEl.timeline.focusElement = timelineViewEl;
}

document.addEventListener('DOMContentLoaded', onLoad);