mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
control/controlclient: do not periodically print full netmap
The netmaps can get really large. Printing, processing, and uploading them is expensive. Only print the header on an ongoing basis. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:

committed by
Josh Bleecher Snyder

parent
a666b546fb
commit
4c8b5fdec4
@@ -87,6 +87,12 @@ func (nm *NetworkMap) Concise() string {
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
func (nm *NetworkMap) VeryConcise() string {
|
||||
buf := new(strings.Builder)
|
||||
nm.printConciseHeader(buf)
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// printConciseHeader prints a concise header line representing nm to buf.
|
||||
//
|
||||
// If this function is changed to access different fields of nm, keep
|
||||
@@ -132,7 +138,7 @@ func (a *NetworkMap) equalConciseHeader(b *NetworkMap) bool {
|
||||
return (a.Debug == nil && b.Debug == nil) || reflect.DeepEqual(a.Debug, b.Debug)
|
||||
}
|
||||
|
||||
// printPeerConcise appends to buf a line repsenting the peer p.
|
||||
// printPeerConcise appends to buf a line representing the peer p.
|
||||
//
|
||||
// If this function is changed to access different fields of p, keep
|
||||
// in nodeConciseEqual in sync.
|
||||
|
Reference in New Issue
Block a user