Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions byconity/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(byconity --database bench --time --format=Null --query="$query" </dev/null 2>&1 ||:)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(byconity --database bench --time --format=Null --query="$query" </dev/null 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
7 changes: 5 additions & 2 deletions chyt/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ run() {
cat queries.sql | while read query; do
echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(yt clickhouse execute "$query" --alias *clickbench@0 --proxy $YT_PROXY --format JSON | jq .statistics.elapsed 2>&1)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(yt clickhouse execute "$query" --alias *clickbench@0 --proxy $YT_PROXY --format JSON | jq .statistics.elapsed 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)
[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2
done
if [[ $QUERY_NUM == $TOTAL_LINES ]]
then echo "]"
Expand Down
10 changes: 7 additions & 3 deletions clickhouse-datalake-partitioned/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(./clickhouse local --path . --time --format Null --filesystem_cache_name cache --query="$query" 2>&1) # (*)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(./clickhouse local --path . --time --format Null --filesystem_cache_name cache --query="$query" 2>&1) # (*)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
10 changes: 7 additions & 3 deletions clickhouse-datalake/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(./clickhouse local --path . --time --format Null --filesystem_cache_name cache --query="$query" 2>&1) # (*)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(./clickhouse local --path . --time --format Null --filesystem_cache_name cache --query="$query" 2>&1) # (*)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
10 changes: 7 additions & 3 deletions clickhouse-parquet-partitioned/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(./clickhouse local --time --format Null --query="$(cat create.sql); $query" 2>&1 | tail -n1) # (*)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(./clickhouse local --time --format Null --query="$(cat create.sql); $query" 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1) # (*)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
10 changes: 7 additions & 3 deletions clickhouse-parquet/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(./clickhouse local --time --format Null --query="$(cat create.sql); $query" 2>&1 | tail -n1) # (*)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(./clickhouse local --time --format Null --query="$(cat create.sql); $query" 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1) # (*)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
10 changes: 7 additions & 3 deletions clickhouse-tencent/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1 ||:)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
10 changes: 7 additions & 3 deletions clickhouse-web/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ cat queries.sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1 ||:) # (*)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1) # (*)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
10 changes: 7 additions & 3 deletions clickhouse/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ cat queries"$SUFFIX".sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1 ||:) # (*)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(clickhouse-client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OUT --> CMD?

CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1) # (*)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# (*) should relate to l. 20.


[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts to run submissions in an unattended amnner actually make some expectations how the output looks like:

Basically: In case of a segfault, we need to print null. We actually did that already before.

To give some background: ClickBench focuses on runtimes for successful queries. If a query doesn't run, it doesn't penalize it based on the reason for this (OOM, crash, etc.).

No such assumptions exist for the format of result.csv (l. 28) but I guess it will be nice to keep its content in-sync with the result that is printed to stdout.


echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down
7 changes: 5 additions & 2 deletions pinot/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ cat queries.sql | while read -r query; do
echo -n "["
for i in $(seq 1 $TRIES); do
echo "{\"sql\":\"$query option(timeoutMs=300000)\"}"| tr -d ';' > query.json
RES=$(curl -s -XPOST -H'Content-Type: application/json' http://localhost:8000/query/sql/ -d @query.json | jq 'if .exceptions == [] then .timeUsedMs/1000 else "-" end' )
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(curl -s -XPOST -H'Content-Type: application/json' http://localhost:8000/query/sql/ -d @query.json | jq 'if .exceptions == [] then .timeUsedMs/1000 else "-" end' 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)
[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: try=${i} ${RES}" >&2
done
echo "],"
done
10 changes: 7 additions & 3 deletions ursa/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ cat queries"$SUFFIX".sql | while read -r query; do

echo -n "["
for i in $(seq 1 $TRIES); do
RES=$(./ursa client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1 ||:)
[[ "$?" == "0" ]] && echo -n "${RES}" || echo -n "null"
OUT=$(./ursa client --host "${FQDN:=localhost}" --password "${PASSWORD:=}" ${PASSWORD:+--secure} --time --format=Null --query="$query" --progress 0 2>&1)
CH_EXIT=$?
RES=$(printf '%s\n' "$OUT" | tail -n1)

[[ "$CH_EXIT" == "0" ]] && echo -n "${RES}" || echo -n "null"
[[ "$i" != $TRIES ]] && echo -n ", "
[[ "$CH_EXIT" == "139" ]] && echo "SEGFAULT: q=${QUERY_NUM} try=${i} ${RES}" >&2

echo "${QUERY_NUM},${i},${RES}" >> result.csv
echo "${QUERY_NUM},${i},${RES},${CH_EXIT}" >> result.csv
done
echo "],"

Expand Down