public long getRxCount() { return rxCount(); }
public ByteSizeValue getRxSize() { return rxSize(); }
public long getServerOpen() { return serverOpen(); }
private void sendNodeTransportStats(TransportStats transportStats) { String type = buildMetricName("node.transport"); sendInt(type, "serverOpen", transportStats.serverOpen()); sendInt(type, "rxCount", transportStats.rxCount()); sendInt(type, "rxSizeBytes", transportStats.rxSize().bytes()); sendInt(type, "txCount", transportStats.txCount()); sendInt(type, "txSizeBytes", transportStats.txSize().bytes()); }
transportStatsBean.serverOpen = transportStats.getServerOpen(); transportStatsBean.rxCount = transportStats.getRxCount(); transportStatsBean.rxSize = transportStats.getRxSize().getBytes(); transportStatsBean.rxSizeDelta = transportStats.getRxSize().getBytes() - transportStatsBean.rxSize; transportStatsBean.txCount = transportStats.getTxCount(); transportStatsBean.txSize = transportStats.getTxSize().getBytes(); transportStatsBean.txSizeDelta = transportStats.getTxSize().getBytes() - transportStatsBean.txSize;
getTransport().toXContent(builder, params);
public long getTxCount() { return txCount(); }
public ByteSizeValue getTxSize() { return txSize(); }
@Override public final TransportStats getStats() { return new TransportStats(acceptedChannels.size(), readBytesMetric.count(), readBytesMetric.sum(), transmittedBytesMetric.count(), transmittedBytesMetric.sum()); }
public static TransportStats readTransportStats(StreamInput in) throws IOException { TransportStats stats = new TransportStats(); stats.readFrom(in); return stats; }
public void testAcceptedChannelCount() throws Exception { assertBusy(() -> { TransportStats transportStats = serviceA.transport.getStats(); assertEquals(channelsPerNodeConnection(), transportStats.getServerOpen()); }); assertBusy(() -> { TransportStats transportStats = serviceB.transport.getStats(); assertEquals(channelsPerNodeConnection(), transportStats.getServerOpen()); }); serviceA.close(); assertBusy(() -> { TransportStats transportStats = serviceB.transport.getStats(); assertEquals(0, transportStats.getServerOpen()); }); }
assertEquals(0, stats.getRxCount()); assertEquals(0, stats.getTxCount()); assertEquals(0, stats.getRxSize().getBytes()); assertEquals(0, stats.getTxSize().getBytes()); assertEquals(1, transportStats.getRxCount()); assertEquals(1, transportStats.getTxCount()); assertEquals(25, transportStats.getRxSize().getBytes()); assertEquals(45, transportStats.getTxSize().getBytes()); }); serviceC.sendRequest(connection, "action", new TestRequest("hello world"), TransportRequestOptions.EMPTY, assertEquals(1, transportStats.getRxCount()); assertEquals(2, transportStats.getTxCount()); assertEquals(25, transportStats.getRxSize().getBytes()); assertEquals(91, transportStats.getTxSize().getBytes()); }); sendResponseLatch.countDown(); responseLatch.await(); assertEquals(2, stats.getRxCount()); assertEquals(2, stats.getTxCount()); assertEquals(46, stats.getRxSize().getBytes()); assertEquals(91, stats.getTxSize().getBytes()); } finally { serviceC.close();
getTransport().toXContent(builder, params);
public long getTxCount() { return txCount(); }
public ByteSizeValue getTxSize() { return txSize(); }
@Override public final TransportStats getStats() { return new TransportStats(acceptedChannels.size(), readBytesMetric.count(), readBytesMetric.sum(), transmittedBytesMetric.count(), transmittedBytesMetric.sum()); }
assertEquals(0, stats.getRxCount()); assertEquals(0, stats.getTxCount()); assertEquals(0, stats.getRxSize().getBytes()); assertEquals(0, stats.getTxSize().getBytes()); assertEquals(1, transportStats.getRxCount()); assertEquals(1, transportStats.getTxCount()); assertEquals(25, transportStats.getRxSize().getBytes()); assertEquals(45, transportStats.getTxSize().getBytes()); }); serviceC.sendRequest(connection, "action", new TestRequest("hello world"), TransportRequestOptions.EMPTY, assertEquals(1, transportStats.getRxCount()); assertEquals(2, transportStats.getTxCount()); assertEquals(25, transportStats.getRxSize().getBytes()); assertEquals(91, transportStats.getTxSize().getBytes()); }); sendResponseLatch.countDown(); responseLatch.await(); assertEquals(2, stats.getRxCount()); assertEquals(2, stats.getTxCount()); int addressLen = serviceB.boundAddress().publishAddress().address().getAddress().getAddress().length; assertEquals(185 + addressLen, stats.getRxSize().getBytes()); assertEquals(91, stats.getTxSize().getBytes()); } finally { serviceC.close();
getTransport().toXContent(builder, params);
public ByteSizeValue getRxSize() { return rxSize(); }
public long getRxCount() { return rxCount(); }