cmd/cli: cache query from self result

So we don't waste time to compute a result which is not likely to be
changed.
This commit is contained in:
Cuong Manh Le
2024-09-23 21:51:10 +07:00
committed by Cuong Manh Le
parent 14c88f4a6d
commit f507bc8f9e
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -98,6 +98,7 @@ type prog struct {
ptrLoopGuard *loopGuard
lanLoopGuard *loopGuard
metricsQueryStats atomic.Bool
queryFromSelfMap sync.Map
selfUninstallMu sync.Mutex
refusedQueryCount int