mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2025-01-26 12:20:20 +08:00
make service and protocol scope names distinguishable
This commit is contained in:
parent
50387915ba
commit
76b7e49ed7
4
rcmgr.go
4
rcmgr.go
@ -450,7 +450,7 @@ func (s *serviceScope) getPeerScope(p peer.ID) *resourceScope {
|
||||
s.peers = make(map[peer.ID]*resourceScope)
|
||||
}
|
||||
|
||||
ps = newResourceScope(l, nil, fmt.Sprintf("%s.peer:%s", s.name, p), s.rcmgr.trace, s.rcmgr.metrics)
|
||||
ps = newResourceScope(l, nil, fmt.Sprintf("service:%s.peer:%s", s.name, p), s.rcmgr.trace, s.rcmgr.metrics)
|
||||
s.peers[p] = ps
|
||||
|
||||
ps.IncRef()
|
||||
@ -477,7 +477,7 @@ func (s *protocolScope) getPeerScope(p peer.ID) *resourceScope {
|
||||
s.peers = make(map[peer.ID]*resourceScope)
|
||||
}
|
||||
|
||||
ps = newResourceScope(l, nil, fmt.Sprintf("%s.peer:%s", s.name, p), s.rcmgr.trace, s.rcmgr.metrics)
|
||||
ps = newResourceScope(l, nil, fmt.Sprintf("protocol:%s.peer:%s", s.name, p), s.rcmgr.trace, s.rcmgr.metrics)
|
||||
s.peers[p] = ps
|
||||
|
||||
ps.IncRef()
|
||||
|
Loading…
Reference in New Issue
Block a user