Add go fmt

This commit is contained in:
James Jeffrey
2017-07-07 10:14:08 -07:00
committed by Reed Allman
parent 9a7141967c
commit 81e39b210d
40 changed files with 185 additions and 187 deletions

View File

@@ -1,30 +1,30 @@
package main
import (
"fmt"
"net/http"
"io/ioutil"
"encoding/json"
"time"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"time"
)
type execution struct {
DurationSeconds float64
Hostname string
node string
body string
Hostname string
node string
body string
responseSeconds float64
}
var (
lbHostPort, nodesStr, route string
lbHostPort, nodesStr, route string
numExecutions, maxPrime, numLoops int
nodes []string
nodesByContainerId map[string]string = make(map[string]string)
verbose bool
nodes []string
nodesByContainerId map[string]string = make(map[string]string)
verbose bool
)
func init() {
@@ -124,4 +124,3 @@ func main() {
discoverContainerIds()
invokeLoadBalancer(lbHostPort, route, numExecutions, maxPrime, numLoops)
}

View File

@@ -3,8 +3,8 @@ package main
import (
"fmt"
"os"
"strings"
"strconv"
"strings"
"time"
)
@@ -50,10 +50,9 @@ func main() {
for i := 0; i < numLoops; i++ {
primes := sieveOfEratosthenes(maxPrime)
_ = primes
if i == numLoops - 1 {
if i == numLoops-1 {
//fmt.Printf("Highest three primes: %d %d %d\n", primes[len(primes) - 1], primes[len(primes) - 2], primes[len(primes) - 3])
}
}
fmt.Printf("{\"durationSeconds\": %f, \"hostname\": \"%s\", \"max\": %d, \"loops\": %d}", time.Since(start).Seconds(), os.Getenv("HOSTNAME"), maxPrime, numLoops)
}