воскресенье, 19 марта 2017 г., 21:15:25 UTC+3 пользователь Konstantin Shaposhnikov написал: > > >> As you can see, your hypothesis is not true, more then 99 percent of >> requests is really fast and occur less the 1 millisecond! And I try to find >> our what happens in this 1 percent! >> >> > > I was probably not clear enough with my explanation. In 99% of cases > net/http (or fasthttp) parsing will be very fast (a few micros) and won't > add much to the internally measured latency. However in 1% of cases there > could be a GC stop the world pause or go runtime decides to use the request > goroutine to assist GC or some sub-optimal scheduling decision or I/O and > the request will take longer but this will never be reflected in the > measured time. >
Ack! > > https://golang.org/cmd/trace/ can be used to find out what is happening > inside a running Go application. If you capture a trace during interval > with request(s) taking more time that usual then you will be able to find > out what exactly takes so long (syscalls, scheduler, GC, etc). > Thanks, I'll try to use it for my purpose! > > Also note that there are still a few latency related bugs in Go runtime. > E.g. https://github.com/golang/go/issues/14812, > https://github.com/golang/go/issues/18155, > https://github.com/golang/go/issues/18534 > Thanks, I'll will investigate them too! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.