Thank you, this helped a lot, strace showed there was a background activity looking for *gopackgesdriver *file. The problem was I had
packages.Load(nil, "std") in one of my modules run in an init(). Changed this piece into on-demand logic and now real 0m0,010s user 0m0,001s sys 0m0,009s воскресенье, 5 июля 2020 г., 3:45:34 UTC+3 пользователь Kurtis Rader написал: > > On Sat, Jul 4, 2020 at 5:24 PM Denis Cheremisov <denis.c...@gmail.com > <javascript:>> wrote: > >> I have a small app like >> >> func main() { >> start := time.Now() >> … >> fmt.Println(time.Since(start)) >> } >> >> where output is ≈400μs but the actual time is about 0.16s, I mean.... >> > > I can't reproduce and since it is really rare to see anyone report > something like this it is most likely a quirk of your system. Also, when > reporting issues of this nature you should include the go version and > information about the platform such as the OS. I would start by using > `strace -ttt -o strace.out app-name` to see if there are any syscalls that > are taking longer than expected. If that doesn't reveal an obvious culprit > then the time is probably external to your program. > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a92c8cf9-a812-427a-bcbb-128e228f02b5o%40googlegroups.com.