-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathexport_old.sh
28 lines (17 loc) · 952 Bytes
/
export_old.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# file name pattern: qdrant-continuous-benchmark-laion-small-clip-upload-2023-08-01-23-09-25.json
# read dates from file names, without hours and minutes
ls -1 results/qdrant/qdrant-continuous-benchmark-laion-small-clip-upload-* | sed -e 's/.*upload-\(.*\)\.json/\1/' | sed -e 's/\(.*\)-\(.*\)-\(.*\)-\(.*\)-\(.*\)-\(.*\)/\1-\2-\3/' | sort | uniq > dates.txt
# read dates and search for files with the same date
while read -r date; do
echo "Processing date: $date"
SEARCH_FILE=$(ls -1 results/qdrant/*.json | grep "$date" | grep search | head -n 1)
UPLOAD_FILE=$(ls -1 results/qdrant/*.json | grep "$date" | grep upload | head -n 1)
echo "Search file: $SEARCH_FILE"
echo "Upload file: $UPLOAD_FILE"
SEARCH_RESULTS_FILE=$SEARCH_FILE \
UPLOAD_RESULTS_FILE=$UPLOAD_FILE \
MEMORY_USAGE_FILE=results/qdrant/mem-usage.txt \
MEASURE_TIMESTAMP=$date \
bash -x tools/upload_results_postgres.sh
done < dates.txt