From b9ee7d413c242fc34e55a2a5604bdcdc40550f6a Mon Sep 17 00:00:00 2001 From: Oleg Date: Tue, 22 Jun 2021 02:51:56 +0300 Subject: [PATCH] Feature/rand init (#4) * tiny rand init * init rand Co-authored-by: Oleg --- bench_server/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bench_server/main.go b/bench_server/main.go index 8aa5baa..dd49d17 100644 --- a/bench_server/main.go +++ b/bench_server/main.go @@ -2,16 +2,19 @@ package main import ( "flag" - "github.com/valyala/fasthttp" "log" "math/rand" "strconv" + "time" + + "github.com/valyala/fasthttp" ) var serverPort = flag.Int("p", 8080, "port to use for benchmarks") func main() { flag.Parse() + rand.Seed(time.Now().UnixNano()) addr := "localhost:" + strconv.Itoa(*serverPort) log.Println("Starting HTTP server on:", addr) log.Fatalln(fasthttp.ListenAndServe(addr, func(c *fasthttp.RequestCtx) {