NetworkProfilerStage extends StreamingStage implements CodeNavigator.Listener { @NotNull public DetailedNetworkUsage getDetailedNetworkUsage() { return myDetailedNetworkUsage; } NetworkProfilerStage(StudioProfilers profilers); boolean hasUserUsedNetworkSelection(); @NotNull NetworkConnectionsModel getConnectionsModel(); @NotNull RangeSelectionModel getRangeSelectionModel(); @NotNull StackTraceModel getStackTraceModel(); @NotNull HttpDataFetcher getHttpDataFetcher(); boolean setSelectedConnection(@Nullable HttpData data); @Nullable HttpData getSelectedConnection(); @NotNull AspectModel<NetworkProfilerAspect> getAspect(); @Override void enter(); @Override void exit(); @NotNull String getName(); @NotNull DetailedNetworkUsage getDetailedNetworkUsage(); @NotNull AxisComponentModel getTrafficAxis(); @NotNull AxisComponentModel getConnectionsAxis(); @NotNull NetworkStageLegends getLegends(); @NotNull NetworkStageLegends getTooltipLegends(); @NotNull EaseOutModel getInstructionsEaseOutModel(); @NotNull EventMonitor getEventMonitor(); @Override void onNavigated(@NotNull CodeLocation location);  }
@Test public void getDetailedNetworkUsage() { List<RangedContinuousSeries> series = myStage.getDetailedNetworkUsage().getSeries(); assertThat(series).hasSize(3); RangedContinuousSeries receiving = series.get(0); RangedContinuousSeries sending = series.get(1); RangedContinuousSeries connections = series.get(2); assertThat(receiving.getName()).isEqualTo("Receiving"); assertThat(sending.getName()).isEqualTo("Sending"); assertThat(connections.getName()).isEqualTo("Connections"); assertThat(receiving.getSeries()).hasSize(1); assertThat(receiving.getSeries().get(0).x).isEqualTo(0); assertThat(receiving.getSeries().get(0).value.longValue()).isEqualTo(2); assertThat(sending.getSeries()).hasSize(1); assertThat(sending.getSeries().get(0).x).isEqualTo(0); assertThat(sending.getSeries().get(0).value.longValue()).isEqualTo(1); assertThat(connections.getSeries()).hasSize(1); assertThat(connections.getSeries().get(0).x).isEqualTo(0); assertThat(connections.getSeries().get(0).value.longValue()).isEqualTo(4); }