grafana / xk6-output-prometheus-remote

k6 extension to output real-time test metrics using Prometheus Remote Write.
GNU Affero General Public License v3.0
156 stars 72 forks source link

Fix 32-bit build #158

Closed mem closed 10 months ago

mem commented 1 year ago

When trying to build for 32-bit ARM (linux/arm), you get:

pkg/remote/client.go:120:35: cannot use 0xffffffff (untyped int constant 4294967295) as int value in argument to fmt.Errorf (overflows)

Pass the constant as unsigned 64-bit integer, which is what the underlying snappy code is doing (it's casting the argument to an uint64 and comparing against 0xffffffff, which in Go means it's comparing against uint64(0xffffffff)). Since this is just an error message, it shouldn't matter, but let's be consistent.

mem commented 1 year ago

Sorry about recreating the PR instead of reopening the old one (#132). My bad.

I reworded the commit message to reflect the fact that this is not specific to ARM.

The reason why I would like to have this is because I would like to run k6 on linux/arm (Raspberry Pi and whatnot).