Open interfan7 opened 3 months ago
make clean && make
It will print you a build command, like
go build -mod vendor --ldflags '-X main.BuildVersion=v0.17.3-7-g1159' github.com/go-graphite/go-carbon
and produce go-carbon binary in current directory.
$ file go-carbon
go-carbon: Mach-O 64-bit executable arm64
GOOS=linux GOARCH=amd64
) instead:
GOOS=linux GOARCH=amd64 go build -mod vendor --ldflags '-X main.BuildVersion=v0.17.3-7-g1159' github.com/go-graphite/go-carbon
Now you have linux binary instead:
$ file go-carbon
go-carbon: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=... with debug_info, not stripped
@deniszh I think the explenation just couldn't be any better!! 👏🏻🙏🏻
I need the ability to build locally in order to debug and investigate a query which takes very long.
I'm not too familiar with
Go
and have zero experience with building it. Preferably I want to build in Mac and the target shall be a Linux Ubuntu machine. Are there instructions to start?What to investigate? I've a case of a query which doesn't complete even in 2 minutes, even though CPU usage and IO disks counters don't seem to reach the limits. That query shall return almost 80K metrics (Whisper files).
I want to start by inserting my own log lines to track down and pin-point what takes so long, is it really about reading datapoints from Whisper files?