-
Clone and open
picostess
project:cd stroppy
-
Install go.
-
Install
xk6
toolchain:go install go.k6.io/xk6/cmd/[email protected]
-
Run tests:
make test
-
Build
stroppy
binary:make build
Create test user
echo "CREATE USER \"stress\" WITH PASSWORD 'T0psecret' USING md5;
ALTER USER \"stress\" WITH LOGIN;
GRANT CREATE TABLE TO \"stress\";
GRANT ALTER TABLE TO \"stress\";
GRANT DROP TABLE TO \"stress\";
GRANT READ TABLE TO \"stress\";
GRANT WRITE TABLE TO \"stress\";" | picodata admin path/to/admin.sock
Note: due each protocol uses diffrent auth method, you can change it, using this command:
echo "ALTER USER \"stress\" WITH PASSWORD 'T0psecret' USING chap-sha1;" | picodata admin path/to/admin.sock
By running scripts/create_table_with_addrs.py
script,
you can create table, which will contain iproto and pgproto addresses
for the each picodata instance:
python3 scripts/create_table_with_addrs.py -p path/to/instance/folders -t preferable_table_name
Flags:
- -p: path to folder where instances (--data-dir) folders are located. Each instance folder must contain admin.sock file.
- -t: name of table, that will be created.
Due iproto/pgproto addresses inside cluster cant be accuired by executing a SQL command,
this script will only be useful if all picodata instances are running on the same machine and
admin.sock files can be reached within a single machine.
If Picodata instances are running on separate machines - execute python script on each machine.
After a successful execution, you only need to provide a single host:port using the --addrs
flag,
when passing --atbl
flag.
-
Create a config yml file, guiding by config docs file.
The Config file is essential and is used by all commands. -
Run stroppy:
./stroppy [command] [flags]
To list all available commands and flags description:
./stroppy help
./stroppy help [command]
./stroppy [command]
- schema up: setup test tables, indexes inside database
./stroppy schema up -c=./scripts/configs/queue.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432 --sf=1 -w=20 -b=100 -s=42
- schema drop: drop test tables, indexes inside database
./stroppy schema drop -c=./scripts/configs/queue.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432
- bench: suitable for benchmarking
./stroppy bench -c=./scripts/configs/bench.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432 -o=./summary -e=50 -s=42 -d=5s --vu=2 --maxvu=200 --rps=100
- queue: suitable for SQL testing
./stroppy queue -c=./scripts/configs/queue.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432 -o=./summary -s=42 --vu=2