@Test public void addRxBytesForMobileType() { telemetryMetrics.addRxBytesForType(ConnectivityManager.TYPE_MOBILE, 10L); Metrics metrics = telemetryMetrics.getMetrics(TelemetryMetrics.MOBILE_BYTES_RX); assertThat(metrics.getValue()).isEqualTo(10L); }
public void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes) { if (isValidNetworkType(networkType)) { add(networkType == TYPE_WIFI ? WIFI_BYTES_RX : MOBILE_BYTES_RX, bytes); } }
TelemetryMetrics extends AbstractCompositeMetrics { public void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes) { if (isValidNetworkType(networkType)) { add(networkType == TYPE_WIFI ? WIFI_BYTES_RX : MOBILE_BYTES_RX, bytes); } } }
TelemetryMetrics extends AbstractCompositeMetrics { public void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes) { if (isValidNetworkType(networkType)) { add(networkType == TYPE_WIFI ? WIFI_BYTES_RX : MOBILE_BYTES_RX, bytes); } } TelemetryMetrics(long maxLength); }
TelemetryMetrics extends AbstractCompositeMetrics { public void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes) { if (isValidNetworkType(networkType)) { add(networkType == TYPE_WIFI ? WIFI_BYTES_RX : MOBILE_BYTES_RX, bytes); } } TelemetryMetrics(long maxLength); void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes); void addTxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes); }
TelemetryMetrics extends AbstractCompositeMetrics { public void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes) { if (isValidNetworkType(networkType)) { add(networkType == TYPE_WIFI ? WIFI_BYTES_RX : MOBILE_BYTES_RX, bytes); } } TelemetryMetrics(long maxLength); void addRxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes); void addTxBytesForType(@IntRange(from = TYPE_MOBILE, to = TYPE_VPN) int networkType, long bytes); static final String EVENTS_TOTAL; static final String EVENTS_FAILED; }