mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: add metrics around send.offered.hashes
This commit is contained in:
parent
867fed2d94
commit
2cfd8f0d8e
2 changed files with 3 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ func trackChunks(testData []byte) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
count := 0
|
count := 0
|
||||||
for i, info := range hasInfo {
|
for _, info := range hasInfo {
|
||||||
if info.Has {
|
if info.Has {
|
||||||
hostChunks = append(hostChunks, "1")
|
hostChunks = append(hostChunks, "1")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -183,6 +183,8 @@ func (p *Peer) SendOfferedHashes(s *server, f, t uint64) error {
|
||||||
)
|
)
|
||||||
defer sp.Finish()
|
defer sp.Finish()
|
||||||
|
|
||||||
|
defer metrics.GetOrRegisterResettingTimer("send.offered.hashes", nil).UpdateSince(time.Now())
|
||||||
|
|
||||||
hashes, from, to, proof, err := s.setNextBatch(f, t)
|
hashes, from, to, proof, err := s.setNextBatch(f, t)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue