resource-estimator

command module
v0.0.0-...-5dd901d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

Sourcegraph resource estimator

Sourcegraph resource estimator helps predict and plan the required resource for your deployment.

This tool ensures you provision appropriate resources to scale your instance.

Development Prerequisites

Optional prerequisites

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:

  1. Separately installing each of the tools listed in .tool-versions (via homebrew or something similar)
  2. Using the asdf version manager and running scripts/asdf-add-plugins.sh followed by asdf install

Development

./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).

Developing on the docsite

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.

Developing without the docsite

You can view the page without any CSS styling at http://localhost:8080

Golden test

Run go test -update in the internal/scaling directory to update the tests

Releasing

  1. Get your changes merged into master first and git checkout master.
  2. Run ./build.sh which will produce a main_$COMMIT.wasm file.
  3. Upload that file to the Google Cloud Storage bucket.
  4. Update the version=<oldcommit> attribute in this file to match the file you uploaded.
  5. Merge that PR and your change has been released!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL