Sourcegraph resource estimator helps predict and plan the required resource for your deployment.
This tool ensures you provision appropriate resources to scale your instance.
- Install Go, then:
The project includes a justfile that includes simple commands for automating common tasks such as:
- Building the WASM binary:
just build
- Automatic formatting of various file types:
just format
- Linting of various filetypes:
just lint
- A single command to perform all of the above steps:
just
You can install just
and the various commands it calls by either:
- Separately installing each of the tools listed in .tool-versions (via homebrew or something similar)
- Using the asdf version manager and running scripts/asdf-add-plugins.sh followed by
asdf install
./scripts/watch-wasm.sh # or "just watch | just dev"
This will start serving on http://localhost:8080 the WASM bundle and recompiling code each time you reload the page (any errors compiling your changes will show up in this terminal).
Visit http://docs.sourcegraph.com/admin/install/resource_estimator?dev=true and the page will use your local wasmserve
instance, so
that changes you make to the code are automatically reflected when you reload the page.
This is the best option as you can see the page with full CSS styling.
You can view the page without any CSS styling at http://localhost:8080
Run go test -update
in the internal/scaling directory to update the tests
- Get your changes merged into
master
first andgit checkout master
. - Run
./build.sh
which will produce amain_$COMMIT.wasm
file. - Upload that file to the Google Cloud Storage bucket.
- Update the
version=<oldcommit>
attribute in this file to match the file you uploaded. - Merge that PR and your change has been released!