exportChannel method
Implementation
@override
void exportChannel(String id, ChannelSnapshot s) {
_writeHeaderIfNeeded();
final mops = s.recvOpsPerSec > 0 ? s.recvOpsPerSec / 1e6 : null;
final nsPerOp = s.nsByOp > 0 ? s.nsByOp : null;
_writeln([
DateTime.now().toIso8601String(),
'channel',
id,
s.sent,
s.recv,
s.dropped,
s.closed,
s.trySendOk,
s.trySendFail,
s.tryRecvOk,
s.tryRecvEmpty,
_fmtNum(s.sendP50),
_fmtNum(s.sendP95),
_fmtNum(s.sendP99),
_fmtNum(s.recvP50),
_fmtNum(s.recvP95),
_fmtNum(s.recvP99),
_fmtNum(mops),
_fmtNum(nsPerOp, 1),
_fmtNum(s.dropRate, 4),
_fmtNum(s.trySendFailureRate, 4),
_fmtNum(s.tryRecvEmptyRate, 4),
'', // not a global snapshot
]);
}