You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2018/12/03 23:26:31 UTC
[trafficcontrol] branch master updated: v3.1.1 - now processes each
route immediately as it is read, improving pipe efficiency (#3070)
This is an automated email from the ASF dual-hosted git repository.
dangogh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 8a8a73a v3.1.1 - now processes each route immediately as it is read, improving pipe efficiency (#3070)
8a8a73a is described below
commit 8a8a73a5a229c6b5801945b90180344d79838638
Author: ocket8888 <oc...@gmail.com>
AuthorDate: Mon Dec 3 16:26:26 2018 -0700
v3.1.1 - now processes each route immediately as it is read, improving pipe efficiency (#3070)
---
traffic_ops/testing/compare/compare.go | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/traffic_ops/testing/compare/compare.go b/traffic_ops/testing/compare/compare.go
index 220d773..0f8f07d 100644
--- a/traffic_ops/testing/compare/compare.go
+++ b/traffic_ops/testing/compare/compare.go
@@ -36,7 +36,7 @@ import (
"golang.org/x/net/publicsuffix"
)
-const __version__ = "3.1.0"
+const __version__ = "3.1.1"
const SHORT_HEADER = "# DO NOT EDIT"
const LONG_HEADER = "# TRAFFIC OPS NOTE:"
const LUA_HEADER = "-- DO NOT EDIT"
@@ -579,23 +579,18 @@ func main() {
}
wg.Wait()
- var testRoutes []string
-
scanner := bufio.NewScanner(routesFile)
for scanner.Scan() {
- testRoutes = append(testRoutes, scanner.Text())
+ wg.Add(1)
+ go func(r string) {
+ testRoute(tos, r)
+ wg.Done()
+ }(scanner.Text())
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
- wg.Add(len(testRoutes))
- for _, route := range testRoutes {
- go func(r string) {
- testRoute(tos, r)
- wg.Done()
- }(route)
- }
wg.Wait()
}