-
-
Save yuezato/9c0af68320935b342d0b152811f58cfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EXAMPLE='example' | |
rm -rf $EXAMPLE | |
./target/debug/frugalos create --id $EXAMPLE --data-dir $EXAMPLE/ | |
tmux split-window "RAFT_IO_MAX_LUMP_DATA_SIZE=512 FRUGALOS_SNAPSHOT_THRESHOLD=10 ./target/debug/frugalos -l warning start --data-dir ${EXAMPLE}; read" | |
sleep 5 | |
DEVICE_JSON0='{"file": {"id": "file0", "server": "'$EXAMPLE'", "filepath": "'$EXAMPLE'/file0.lusf"}}' | |
curl -XPUT -d "$DEVICE_JSON0" http://localhost:3000/v1/devices/file0 | |
echo "" | |
sleep 1 | |
BUCKET_JSON=$(cat <<EOF | |
{ | |
"dispersed": { | |
"id": "bucket0", | |
"device": "file0", | |
"tolerable_faults": 6, | |
"data_fragment_count": 4 | |
} | |
} | |
EOF | |
) | |
curl -XPUT -d "$BUCKET_JSON" http://localhost:3000/v1/buckets/bucket0 | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {0..2000}; do | |
echo $i | |
for j in {1..10}; do | |
curl -XPUT -d hoge "http://localhost:3000/v1/buckets/bucket0/objects/obj${i}_${j}" & | |
done | |
wait | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
After doing
./make_bucket.sh
, doput.sh
and wait until a message like the following appears: