mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-14 20:25:17 +00:00
disable certain traces to avoid extreme copy overhead
This commit is contained in:
parent
139c6747d3
commit
9d0cf0bc68
@ -148,19 +148,20 @@ func (t *pubsubTracer) DuplicateMessage(msg *Message) {
|
||||
return
|
||||
}
|
||||
|
||||
now := time.Now().UnixNano()
|
||||
evt := &pb.TraceEvent{
|
||||
Type: pb.TraceEvent_DUPLICATE_MESSAGE.Enum(),
|
||||
PeerID: []byte(t.pid),
|
||||
Timestamp: &now,
|
||||
DuplicateMessage: &pb.TraceEvent_DuplicateMessage{
|
||||
MessageID: []byte(t.idGen.ID(msg)),
|
||||
ReceivedFrom: []byte(msg.ReceivedFrom),
|
||||
Bitmask: msg.Bitmask,
|
||||
},
|
||||
}
|
||||
// disable for now
|
||||
// now := time.Now().UnixNano()
|
||||
// evt := &pb.TraceEvent{
|
||||
// Type: pb.TraceEvent_DUPLICATE_MESSAGE.Enum(),
|
||||
// PeerID: []byte(t.pid),
|
||||
// Timestamp: &now,
|
||||
// DuplicateMessage: &pb.TraceEvent_DuplicateMessage{
|
||||
// MessageID: []byte(t.idGen.ID(msg)),
|
||||
// ReceivedFrom: []byte(msg.ReceivedFrom),
|
||||
// Bitmask: msg.Bitmask,
|
||||
// },
|
||||
// }
|
||||
|
||||
t.tracer.Trace(evt)
|
||||
// t.tracer.Trace(evt)
|
||||
}
|
||||
|
||||
func (t *pubsubTracer) DeliverMessage(msg *Message) {
|
||||
@ -260,18 +261,19 @@ func (t *pubsubTracer) RecvRPC(rpc *RPC) {
|
||||
return
|
||||
}
|
||||
|
||||
now := time.Now().UnixNano()
|
||||
evt := &pb.TraceEvent{
|
||||
Type: pb.TraceEvent_RECV_RPC.Enum(),
|
||||
PeerID: []byte(t.pid),
|
||||
Timestamp: &now,
|
||||
RecvRPC: &pb.TraceEvent_RecvRPC{
|
||||
ReceivedFrom: []byte(rpc.from),
|
||||
Meta: t.traceRPCMeta(rpc),
|
||||
},
|
||||
}
|
||||
// disable for now
|
||||
// now := time.Now().UnixNano()
|
||||
// evt := &pb.TraceEvent{
|
||||
// Type: pb.TraceEvent_RECV_RPC.Enum(),
|
||||
// PeerID: []byte(t.pid),
|
||||
// Timestamp: &now,
|
||||
// RecvRPC: &pb.TraceEvent_RecvRPC{
|
||||
// ReceivedFrom: []byte(rpc.from),
|
||||
// Meta: t.traceRPCMeta(rpc),
|
||||
// },
|
||||
// }
|
||||
|
||||
t.tracer.Trace(evt)
|
||||
// t.tracer.Trace(evt)
|
||||
}
|
||||
|
||||
func (t *pubsubTracer) SendRPC(rpc *RPC, p peer.ID) {
|
||||
@ -287,18 +289,19 @@ func (t *pubsubTracer) SendRPC(rpc *RPC, p peer.ID) {
|
||||
return
|
||||
}
|
||||
|
||||
now := time.Now().UnixNano()
|
||||
evt := &pb.TraceEvent{
|
||||
Type: pb.TraceEvent_SEND_RPC.Enum(),
|
||||
PeerID: []byte(t.pid),
|
||||
Timestamp: &now,
|
||||
SendRPC: &pb.TraceEvent_SendRPC{
|
||||
SendTo: []byte(p),
|
||||
Meta: t.traceRPCMeta(rpc),
|
||||
},
|
||||
}
|
||||
// disable for now
|
||||
// now := time.Now().UnixNano()
|
||||
// evt := &pb.TraceEvent{
|
||||
// Type: pb.TraceEvent_SEND_RPC.Enum(),
|
||||
// PeerID: []byte(t.pid),
|
||||
// Timestamp: &now,
|
||||
// SendRPC: &pb.TraceEvent_SendRPC{
|
||||
// SendTo: []byte(p),
|
||||
// Meta: t.traceRPCMeta(rpc),
|
||||
// },
|
||||
// }
|
||||
|
||||
t.tracer.Trace(evt)
|
||||
// t.tracer.Trace(evt)
|
||||
}
|
||||
|
||||
func (t *pubsubTracer) DropRPC(rpc *RPC, p peer.ID) {
|
||||
@ -314,18 +317,19 @@ func (t *pubsubTracer) DropRPC(rpc *RPC, p peer.ID) {
|
||||
return
|
||||
}
|
||||
|
||||
now := time.Now().UnixNano()
|
||||
evt := &pb.TraceEvent{
|
||||
Type: pb.TraceEvent_DROP_RPC.Enum(),
|
||||
PeerID: []byte(t.pid),
|
||||
Timestamp: &now,
|
||||
DropRPC: &pb.TraceEvent_DropRPC{
|
||||
SendTo: []byte(p),
|
||||
Meta: t.traceRPCMeta(rpc),
|
||||
},
|
||||
}
|
||||
// disable for now
|
||||
// now := time.Now().UnixNano()
|
||||
// evt := &pb.TraceEvent{
|
||||
// Type: pb.TraceEvent_DROP_RPC.Enum(),
|
||||
// PeerID: []byte(t.pid),
|
||||
// Timestamp: &now,
|
||||
// DropRPC: &pb.TraceEvent_DropRPC{
|
||||
// SendTo: []byte(p),
|
||||
// Meta: t.traceRPCMeta(rpc),
|
||||
// },
|
||||
// }
|
||||
|
||||
t.tracer.Trace(evt)
|
||||
// t.tracer.Trace(evt)
|
||||
}
|
||||
|
||||
func (t *pubsubTracer) UndeliverableMessage(msg *Message) {
|
||||
|
Loading…
Reference in New Issue
Block a user