Hello, I am currently working on updating my benchmarking repository which compares goloader to several other "plugin" implementations using Go. I am trying to use docker to standardise my benchmarks and improve my testing as I update to 1.21. However, I am having issues getting goloader running in my latest branch seen here: https://github.com/uberswe/go-plugin-benchmark/tree/docker%2Bautomation
What I do is I run the following commands:
cp -r /usr/local/go/src/cmd/internal /usr/local/go/src/cmd/objfile
go list -export -f '{{if .Export}}packagefile {{.ImportPath}}={{.Export}}{{end}}' std `go list -f {{.Imports}} ./goloader/main.go | awk '{sub(/^\[/, ""); print }' | awk '{sub(/\]$/, ""); print }'` > importcfg
go tool compile -importcfg importcfg -o ./goloader.o ./goloader/main.go
My goloader/main.go file looks like this:
package main
import (
"math/rand"
)
// RandInt uses math/rand to return a random integer
func RandInt() int {
return rand.Int()
}
And then when I run my benchmark I get the following error:
go: downloading github.com/pkujhd/goloader v0.0.0-20220509034319-898ebfc025e3
# github.com/uberswe/go-plugin-benchmark
package github.com/uberswe/go-plugin-benchmark (test)
imports github.com/pkujhd/goloader
imports github.com/pkujhd/goloader/objabi/dataindex: build constraints exclude all Go files in /go/pkg/mod/github.com/pkujhd/goloader@v0.0.0-20220509034319-898ebfc025e3/objabi/dataindex
FAIL github.com/uberswe/go-plugin-benchmark [setup failed]
Hello, I am currently working on updating my benchmarking repository which compares goloader to several other "plugin" implementations using Go. I am trying to use docker to standardise my benchmarks and improve my testing as I update to 1.21. However, I am having issues getting goloader running in my latest branch seen here: https://github.com/uberswe/go-plugin-benchmark/tree/docker%2Bautomation
What I do is I run the following commands:
My goloader/main.go file looks like this:
And then when I run my benchmark I get the following error:
This is the relevant benchmarking code
Any ideas on what I might be doing wrong?