Commit c5f86c4f authored by Aleš Mrázek's avatar Aleš Mrázek
Browse files

Added test script

parent 4d7c831b
#!/bin/bash
SAMPLES_PER_SIZE=2
SIZES=$(seq 1000 1000 200000)
echo "DATA_SIZE;sysrepo_load;sysrepo_get" > test_stat.csv
# DATA_SIZE - počet položek v datasetu
# sysrepo_load - jak dlouho trvalo načíst data do sysrepa ze souboru pomocí programu sysrepocfg
# sysrepo_get - jak dlouho trvalo získat data z operational datastoru programem sysrepocfg
for size in $SIZES; do
for i in $(seq $SAMPLES_PER_SIZE); do
echo
echo "Generating dataset"
rm input*
python3 resolvers-yang/data_generator.py -n $size -f input
mv $(eval "echo input*") input.json
echo
echo
echo "Loading data into sysrepo"
sysrepo_load=$($time sysrepocfg -C input.json)
echo "Elapsed $sysrepo_load"
echo
echo
echo "Requesting data"
sysrepo_get=$($time sysrepocfg --export=/dev/null --format json -d operational -t 30)
echo "Elapsed $sysrepo_get"
echo
echo
echo "$DATA_SIZE;$sysrepo_load;$sysrepo_get" >> $statfile
done
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment