Search in sources :

Example 1 with ChannelTrace

use of io.grpc.channelz.v1.ChannelTrace in project grpc-java by grpc.

the class ChannelzProtoUtilTest method channelTrace_withoutEvents.

@Test
public void channelTrace_withoutEvents() {
    ChannelStats stats = toBuilder(channel.stats).setChannelTrace(new InternalChannelz.ChannelTrace.Builder().setNumEventsLogged(1234).setCreationTimeNanos(1000).build()).build();
    ChannelData protoStats = channelData.toBuilder().setTrace(channelTrace).build();
    assertEquals(ChannelzProtoUtil.extractChannelData(stats), protoStats);
}
Also used : ChannelStats(io.grpc.InternalChannelz.ChannelStats) ChannelData(io.grpc.channelz.v1.ChannelData) ChannelTrace(io.grpc.channelz.v1.ChannelTrace) Test(org.junit.Test)

Aggregations

ChannelStats (io.grpc.InternalChannelz.ChannelStats)1 ChannelData (io.grpc.channelz.v1.ChannelData)1 ChannelTrace (io.grpc.channelz.v1.ChannelTrace)1 Test (org.junit.Test)1