mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Add go fmt
This commit is contained in:
committed by
Reed Allman
parent
9a7141967c
commit
81e39b210d
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user