mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-22 17:08:11 +08:00
This splits the backend into two parts: the local backend for desktop cellxgene and the AWS backend for hosted cellxgene. The local backend is in local_server while the hosted remains in server. The general idea is to copy everything from server to local_server, pull unneeded stuff out of local_server, and keep server as-is for this PR. Not touching server means all the infra and deployment code will continue working just as it did before so we can make those changes incrementally.
Locust Load Test
This directory contains scripts to load test cellxgene's backend. It primary simulates initial data loading and expression data fetch, which are the most common data routes. It currently does not include tests for differential expression or re-clustering routes.
Prerequisites
You need:
- Python 3.6+, and pip
- cellxgene installed
- install the locust dependencies in
requirements-locust.txt
To test
- Choose to run cellxgene in either single dataset or data root mode.
- Edit config.py to indicate which datasets to load:
- in single dataset mode, just set
DataSets=[""] - in dataroot (multi-dataset) mode, add the route names, eg,
DataSets=['foo.cxg', 'bar.cxg']
- in single dataset mode, just set
- Launch cellxgene in the appropriate mode
- launch locust, specifying the correct --host argument
- point your web browser to the locust http server, usually
http://localhost:8089/
Single dataset mode
- Edit config.py and set
DataSets=[""] - in a shell, run
cellxgene launch somefile.h5ad - launch locust in another shell,
locust --host http://localhost:5005/(or wherever you are running cellxgene) - point a browser to the locust port, usually http://localhost:8089/
- run test
Multi-dataset mode
- Edit config.py and set
DataSets=["datapath1", ...] - in a shell, run
cellxgene launch --dataroot path
The remainder of the steps are same as single dataset.