You are viewing a single comment's thread from:

RE: Patroneos: Code Analysis, Benchmark results, Operation and Implementation Recommendations

in #en6 years ago

Hi, @chrisallnutt! We really appreciate you for fixing issue #26.

We used dummy endpoint below with changing latency value in time.Sleep for lab benchmark.

package main

import (
   "fmt"
   "log"
   "net/http"
   "time"
   "runtime"
   "io/ioutil"
)

func main() {
   runtime.GOMAXPROCS(1)
   http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
       if len(r.FormValue("case-two")) > 0 {
           fmt.Println("case two")
       } else {
           time.Sleep(time.Millisecond * 100)
           b, err := ioutil.ReadAll(r.Body)
           if err != nil {
               log.Fatal(err)
           }
           fmt.Println(b)
           //fmt.Println("case one end")
       }
   })

   if err := http.ListenAndServe(":8000", nil); err != nil {
       log.Fatal(err)
   }
}

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 69849.38
ETH 3709.01
USDT 1.00
SBD 3.73