Add traffic monitor

This commit is contained in:
Ben Adrian Sarmiento
2024-06-24 13:05:11 +02:00
parent 921908c890
commit 4049fa7d83
5 changed files with 113 additions and 14 deletions

View File

@@ -93,15 +93,15 @@ func (r *IPRepository) GetHosts(numberOfHosts int, ipv6 bool) []string {
return kvList[i].Value < kvList[j].Value
})
var optimalHosts []string
var hosts []string
if numberOfHosts == 0 {
numberOfHosts = len(kvList)
}
for i := 0; i < numberOfHosts && i < len(kvList); i++ {
optimalHosts = append(optimalHosts, kvList[i].Key)
hosts = append(hosts, kvList[i].Key)
}
return optimalHosts
return hosts
}
func (r *IPRepository) runLatencyTest() {