* Update build
* Only use CGO when building non-Linux.
* Update build to Go 1.11
* Use tab indenting consistently.
Signed-off-by: Ben Kochie <superq@gmail.com>
* Do not rely on AArch64 CPUs to support 32-bit ARM for cross-testing.
Signed-off-by: Alexey Kopytov <akopytov@gmail.com>
* aarch64 like ppc64le reports 64k node_sockstat_TCP_mem_bytes due to 64k pages.
Signed-off-by: Alexey Kopytov <akopytov@gmail.com>
Make sure we cleanup the sys fixtures before unpacking to avoid obsolete
files and conflicts from sticking around.
Signed-off-by: Ben Kochie <superq@gmail.com>
The all target should abort on incorrectly formatted code, instead of
formatting it. The CI pipeline should fail and not silently accept
wrong code.
Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
Without this change, running 'gmake' as the documentation does not finish the
build process to produce the binary.
Signed-off-by: Zach Leslie <xaque208@gmail.com>
This enables native builds to still run the test and all targets without
problems on say 386.
Build failure on Buildkite build 85, prevents enabling native FreeBSD
386 builds.
Try to determine the corresponding 32bit architecture from the current
GOARCH and run the tests under that architecture. This only works on a
GOOS/GOARCH that can execute binaries for the smaller architecture, such
as running linux/386 binaries under linux/amd64.
I tested that this works under linux/amd64 and darwin/amd64, the rest of
the architectures is guesswork.
While we still only run regular tests on Intel/Linux architectures, this
covers general integer overflow issues like #629.
* Add bcache collector for Linux
This collector gathers metrics related to the Linux block cache
(bcache) from sysfs.
* Removed commented out code
* Use project comment style
* Add _sectors to metric name to indicate unit
* Really use project comment style
* Rename bcache.go to bcache_linux.go
* Keep collector namespace clean
Rename:
- metric -> bcacheMetric
- periodStatsToMetrics -> bcachePeriodStatsToMetric
* Shorten slice initialization
* Change label names to backing_device, cache_device
* Remove five minute metrics (keep only total)
* Include units in additional metric names
* Enable bcache collector by default
* Provide metrics in seconds, not nanoseconds
* remove metrics with label "all"
* Add fixtures, update end-to-end for bcache collector
* Move fixtures/sys into tar.gz
This changeset moves the collector/fixtures/sys directory into
collector/fixtures/sys.tar.gz and tweaks the Makefile to unpack the
tarball before tests are run.
The reason for this change is that Windows does not allow colons in a
path (colons are present in some of the bcache fixture files), nor can
it (out of the box) deal with pathnames longer than 260 characters
(which we would be increasingly likely to hit if we tried to replace
colons with longer codes that are guaranteed not the turn up in regular
file names).
* Add ttar: plain text archive, replacement for tar
This changeset adds ttar, a plain text replacement for tar, and uses it
for the sysfs fixture archive. The syntax is loosely based on tar(1).
Using a plain text archive makes it possible to review changes without
downloading and extracting the archive. Also, when working on the repo,
git diff and git log become useful again, allowing a committer to verify
and track changes over time.
The code is written in bash, because bash is available out of the box on
all major flavors of Linux and on macOS. The feature set used is
restricted to bash version 3.2 because that is what Apple is still
shipping.
The programm also works on Windows if bash is installed. Obviously, it
does not solve the Windows limitations (path length limited to 260
characters, no symbolic links) that prompted the move to an archive
format in the first place.
If this is not desired, copy/symlink these binaries to a different path and
set the respective environment variables. For example:
ln -s "$(GOPATH)/bin/{promu,staticcheck}" /usr/local/bin/
PROMU=/usr/local/bin/promu STATICCHECK=/usr/local/bin/staticcheck make
This makes a simple 'make' work on a machine without golang,
and doesn't pull in libraries from elsewhere.
Bump golang version, 1.3 doesn't do http basic auth.