- KWA v2 CLI docs:
kwa/README.md
Use make setup to bootstrap the full local environment (Linux only):
make setupmake setup:
- checks/install required base tools (
git,curl,make,gcc, etc.) - installs Docker if missing and enables the daemon
- installs/ensures Python
3.12 - installs/ensures the Go version required by
kwa/go.mod - clones GMT into this repo at
./green-metrics-tool - runs GMT
install_linux.shnon-interactively with local URLs - attempts full metric-provider dependency setup, retrying with best-effort fallbacks for hardware-specific providers if needed
Important notes:
- This setup is intended for Ubuntu
22.04and24.04only. sudois required.- If your user is newly added to the
dockergroup, you may need to relogin (or runnewgrp docker) before running Docker without sudo. - If
./green-metrics-toolalready exists, setup prompts whether to overwrite it. - DB defaults are sourced from
kwa/.env.example(notablyDATABASE_PASSWORD).
Use make uninstall for safe local teardown:
make uninstallmake uninstall:
- always asks whether to remove DB/data volume
- stops/removes GMT containers (best effort)
- runs
docker system prune(best effort) - removes local artifacts:
kwa/build.gocache.gocache_local.gomodcache./green-metrics-tool
- prompts (Linux) whether to remove pre-install requirements and Docker packages
Notes:
- This uninstall flow is Linux-oriented and destructive.
sudomay be required for package/sudoers cleanup.
Build KWA binary into kwa/build/kwa:
make kwa-buildRun KWA directly from source (kwa/cmd/main.go):
make kwa-runUse make measure (wrapper around scripts/measure.sh):
make measure lang=goRun all languages + all 8 core benchmarks in one combined run:
make measureFilter language/benchmark and change profile/iterations:
make measure lang=go profile=measure
make measure lang=go profile=test
make measure lang=go,c bench=binary-trees,mandelbrot iterations=10
make measure lang=rust iterations=3profile=measure is the default.
iterations=1 is the default.
Direct script usage (future KWA-compatible shape):
scripts/measure.sh profile=measure lang=go,c,cpp bench=binary-trees,mandelbrot iterations=10Supported script args (key=value only):
profile=measure|testlang=<csv>bench=<csv>iterations=<int>gmt_dir=<path>(optional, default:./green-metrics-tool)uri=<path>(optional, default: repo root)
When lang is omitted, all supported languages are used:
ccppcsharpdarterlangfsharpgohaskelljavaluanodejsocamlperlphppythonrubyrustswift
When bench is omitted, these 8 core benchmarks are used:
binary-treesfannkuch-reduxk-nucleotiden-bodyregex-reduxspectral-normfastamandelbrot
Profile behavior:
measure: uses canonical filesbenchmarks/<lang>/<benchmark>.ymland does not pass--dev-no-sleepstest: uses generated filesbenchmarks/<lang>/<benchmark>_test.ymland passes--dev-no-sleeps
[1] clbg