Skip to content
Snippets Groups Projects
Commit c3ae5e65 authored by benjamin's avatar benjamin
Browse files

added a print denoting the number of registered nodes and made node...

added a print denoting the number of registered nodes and made node registeration time prints trace to make it less noisy
parent 7c632193
No related branches found
No related tags found
4 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!418instrumented node registration and made only 4 paralelell node registrations,!340Project/channels
......@@ -27,6 +27,7 @@ import (
"encoding/binary"
"fmt"
"gitlab.com/elixxir/client/cmix/identity/receptionID"
"math/rand"
"sync"
"sync/atomic"
"time"
......@@ -88,6 +89,10 @@ func (c *client) followNetwork(report ClientErrorReport,
return
case <-ticker.C:
if rand.Int()%6 == 0 {
jww.INFO.Printf("Registered with %d nodes", c.NumRegisteredNodes())
}
operator := func(toTrack []receptionID.IdentityUse) error {
// set up tracking tools
......
......@@ -134,6 +134,8 @@ func registerWithNode(sender gateway.Sender, comms RegisterNodeCommsInterface,
var transmissionKey *cyclic.Int
var validUntil uint64
var keyId []byte
start := time.Now()
// TODO: should move this to a pre-canned user initialization
if s.IsPrecanned() {
userNum := int(s.GetTransmissionID().Bytes()[7])
......@@ -156,7 +158,8 @@ func registerWithNode(sender gateway.Sender, comms RegisterNodeCommsInterface,
r.add(nodeID, transmissionKey, validUntil, keyId)
jww.INFO.Printf("Completed registration with node %s", nodeID)
jww.INFO.Printf("Completed registration with node %s,"+
" took %d", nodeID, time.Since(start))
return nil
}
......@@ -81,11 +81,11 @@ func requestKey(sender gateway.Sender, comms RegisterNodeCommsInterface,
return nil, errors.WithMessage(err2,
"requestKey: clientKeyResponse error")
}
jww.INFO.Printf("just comm reg request took %s", time.Since(startInternal))
jww.TRACE.Printf("just comm reg request took %s", time.Since(startInternal))
return keyResponse, nil
}, stop)
jww.INFO.Printf("full reg request took %s", time.Since(start))
jww.TRACE.Printf("full reg request took %s", time.Since(start))
if err != nil {
return nil, nil, 0, err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment