NetworkMonitor extends ProfilerMonitor { public NetworkUsage getNetworkUsage() { return myNetworkUsage; } NetworkMonitor(@NotNull StudioProfilers profilers); @Override @NotNull String getName(); @Override TooltipModel buildTooltip(); @Override void exit(); @Override void enter(); @Override void expand(); AxisComponentModel getTrafficAxis(); NetworkUsage getNetworkUsage(); NetworkLegends getLegends(); NetworkLegends getTooltipLegends();  }
@Test public void getNetworkUsage() { List<RangedContinuousSeries> series = myMonitor.getNetworkUsage().getSeries(); assertEquals(2, series.size()); assertEquals("Receiving", series.get(0).getName()); assertEquals(1, series.get(0).getSeries().size()); assertEquals(0, series.get(0).getSeries().get(0).x); assertEquals(2, series.get(0).getSeries().get(0).value.longValue()); assertEquals("Sending", series.get(1).getName()); assertEquals(1, series.get(1).getSeries().size()); assertEquals(0, series.get(1).getSeries().get(0).x); assertEquals(1, series.get(1).getSeries().get(0).value.longValue()); }