mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
FairMQ: Implement ofi::Socket data/message metrics
This commit is contained in:
committed by
Mohammad Al-Turany
parent
c5072ea425
commit
cb447bde38
@@ -43,6 +43,10 @@ Socket::Socket(Context& context, const string& type, const string& name, const s
|
||||
, fContext(context)
|
||||
, fWaitingForControlPeer(false)
|
||||
, fIoStrand(fContext.GetIoContext())
|
||||
, fBytesTx(0)
|
||||
, fBytesRx(0)
|
||||
, fMessagesTx(0)
|
||||
, fMessagesRx(0)
|
||||
{
|
||||
if (type != "pair") {
|
||||
throw SocketError{tools::ToString("Socket type '", type, "' not implemented for ofi transport.")};
|
||||
@@ -331,7 +335,9 @@ try {
|
||||
throw SocketError(tools::ToString("Failed reading ofi tx completion queue event, reason: ", fi_strerror(ret)));
|
||||
}
|
||||
|
||||
// TODO free msg on tx completion?
|
||||
msg.reset(nullptr);
|
||||
fBytesTx += size;
|
||||
fMessagesTx++;
|
||||
|
||||
return size;
|
||||
}
|
||||
@@ -384,6 +390,9 @@ try {
|
||||
assert(cqEntry.buf == buf);
|
||||
}
|
||||
|
||||
fBytesRx += size;
|
||||
fMessagesRx++;
|
||||
|
||||
return size;
|
||||
}
|
||||
catch (const SilentSocketError& e)
|
||||
|
Reference in New Issue
Block a user