gmon running in docker
deepakpjose opened this issue · 1 comments
deepakpjose commented
Hi Keisku,
I'm trying out your epbf infra to see the creation & destruction of go coroutine. But I'm unclear the steps to do for it in docker environment. Can you please correct me where I'm wrong?
Steps:
- I've built binary using the steps from Docker installation.
- Ran and logged into 'gmon-e2e-x86_64' docker image.
- Built my go program.
- Ran gmon for my program. But I'm getting following error.
root@6daa0584c713:/src# ./bin/gmon -path spinner 2024/05/03 02:13:29 failed to set memlock rlimit: operation not permitted
Following is my program that creates a coroutine to spin till fibonacci calculation completes.
package main
import (
"fmt"
"time"
)
func main() {
go spinner(100*time.Millisecond)
const n = 45
fibN := fib(n)
fmt.Printf("\rFibonacci(%d) = %d\n", n, fibN)
}
func spinner(delay time.Duration) {
for {
for _, r := range `-\|/` {
fmt.Printf("\r%c", r)
time.Sleep(delay)
}
}
}
func fib(x int) int {
if x < 2 {
return x
}
return fib(x-1) + fib(x-2)
}
Thanks,
Deepak
keisku commented