Thanks everyone for looking into this. I've raised an issue
https://github.com/golang/go/issues/27707
On Monday, September 17, 2018 at 4:29:15 PM UTC+8, Dave Cheney wrote:
>
> I've confirmed this uses 14% on a random OS X machine. Please raise a bug,
> https://golang.org/issue/new
>
> On Monda
I've confirmed this uses 14% on a random OS X machine. Please raise a bug,
https://golang.org/issue/new
On Monday, 17 September 2018 14:29:44 UTC+10, Robert Engels wrote:
>
> For reference, similar code under Java consumes 2.5 % CPU.
>
> I tested the Go code under OSX, and it is roughly 10%, whic
For reference, similar code under Java consumes 2.5 % CPU.
I tested the Go code under OSX, and it is roughly 10%, which seems to be very
high. Might be because the “context switching” is performed/attributed to the
process (since it is internal), where for other systems it is the system call
on
Thanks for the input Jan!
When running the following exact code, I saw 20% %CPU in top as well,
measured on a single socket E5-2696v4 server without any vm/container/CPU
intensive task.
package main
import (
"time"
)
func main() {
ticker := time.NewTicker(time.Millisecond)
defer tick
On Sun, Sep 16, 2018 at 10:49 AM Lei Ni wrote:
func main() {
...
for {
select {
case <-ticker.C:
// call my function here
}
}
}
Is the above the actual code you're using for the CPU usage "benchmark"?