ClickHouse/benchmark/generate-results.sh
2022-07-07 00:28:56 +02:00

12 lines
349 B
Bash
Executable File

#!/bin/bash
ls -1 */results/*.txt | while read file
do
SYSTEM=$(echo "$file" | grep -oP '^[\w-]+');
SETUP=$(echo "$file" | sed -r -e 's/^.*\/([a-zA-Z0-9_.-]+)\.txt$/\1/');
echo "{\"system\": \"${SYSTEM}\", \"machine\": \"${SETUP}\", \"time\": \"$(git log -1 --pretty="format:%cs" $file)\", \"result\": [
$(grep -P '^\[.+\]' $file)
]},"
done