@Override public Frame makeFrame(FrameId id, String path, long startMS, long endMS, List<Frame> children) { StopWatch watch = new StopWatch() { long calls = 0; public void start(long start) { /* do nothing */ } public long mark() { return ++calls; } }; StopWatchFrame frame = new StopWatchFrame(id, null, watch); frame.enter(createFakeOperation(path)); frame.exit(); frame.setRange(TimeRange.nanoTimeRange(millisToNanos(startMS), millisToNanos(endMS))); frame.setChildren(children); return frame; } }
((StopWatchFrame) root).addChild(frame);