use of com.android.tools.idea.monitor.ui.cpu.view.ThreadsSegment in project android by JetBrains.
the class CpuProfilerVisualTest method createComponentsList.
@Override
protected List<Animatable> createComponentsList() {
long startTimeUs = mDataStore.getLatestTimeUs();
Range timeCurrentRangeUs = new Range(startTimeUs - RangeScrollbar.DEFAULT_VIEW_LENGTH_US, startTimeUs);
AnimatedTimeRange animatedTimeRange = new AnimatedTimeRange(timeCurrentRangeUs, 0);
//TODO Update test data for CpuUsageSegment to be exactly what it was.
EventDispatcher<ProfilerEventListener> dummyDispatcher = EventDispatcher.create(ProfilerEventListener.class);
mCPULevel2Segment = new CpuUsageSegment(timeCurrentRangeUs, mDataStore, dummyDispatcher);
mThreadsSegment = new ThreadsSegment(timeCurrentRangeUs, mDataStore, dummyDispatcher, (threads) -> {
// TODO: show L3 segment with the charts corresponding to threads selected.
// Hide any charts corresponding to unselected threads and hide L3 segment in case no threads are selected
});
List<Animatable> animatables = new ArrayList<>();
animatables.add(animatedTimeRange);
animatables.add(mThreadsSegment);
mCPULevel2Segment.createComponentsList(animatables);
mThreadsSegment.createComponentsList(animatables);
return animatables;
}
Aggregations