Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2026-04-30 9f2ef60949ced4fab4d077a7e1c6d913f3620c9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
 
TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S`
FILENAME=automated_test_results/$TIMESTAMP.csv
NRUNS=${1:-1000}
 
touch $FILENAME
sudo chmod 777 $FILENAME
 
echo "Each test will run $NRUNS times."
 
# Create header
echo "Test Case;Category;plcsharp;plfsharp;plv8;plpython;plpgsql;pljava;plperl;pllua;pltcl;plr" >> $FILENAME
 
# Create the content
for file in tests/benchmark/bench-*.sql
do
    echo $file
    sed "s/NRUNS/$NRUNS/g" $file | (sudo -u postgres psql) | grep "|" | grep -v "column" | sed "s/|/;/g" | sed s/'\s'//g  >> $FILENAME
done
 
sed -i "s/;/\t/g" $FILENAME
cp $FILENAME "docs/img/pldotnet-performance-data-${TIMESTAMP:0:10}.csv"