search-indexer

command module
v0.0.0-...-015189f Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

README

search-indexer

Index resources for search.

Development

  1. Setup development make setup
  2. Run tests make tests
  3. Run locally make run

Explore other supported tasks with make help.

Unit Test

Unit tests mock the pgx connection object. More info: https://github.com/driftprogramming/pgxpoolmock

Scale Test

Prerequisites:

You must have python, pip and locust installed

Running Locust
  1. Once we have the search indexer running with steps above, navigate to the test folder and run the following command: locust -f locust-clusters.py

  2. Follow the url provided (http://localhost:8089) and input load parameters in ui prompt. Alternatively, we can just use this one line command instead of the UI for more automatated flow: locust -f locust-clusters.py --headless --users 10 --spawn-rate 5 -H https://localhost:3010

For more on locust visit https://docs.locust.io/en/stable/index.html

Running Locust inside your cluster
  1. Build the docker image.
    docker build -f Dockerfile.locust .
    
  2. Publish the docker image.
  3. Deploy the following job on your cluster
    oc apply -f test/locustJob.yaml
    

Rebuild Date: 2022-09-26

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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