Feature/rand init (#4)
* tiny rand init * init rand Co-authored-by: Oleg <o.musin@tinkoff.ru>
This commit is contained in:
parent
0b5fa4d152
commit
b9ee7d413c
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue