Skip to content

Commit 6fd2147

Browse files
committed
enable to pass a custom number of points
1 parent cc7ecfd commit 6fd2147

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/run-crasher.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
crash_probability:
1818
description: "Probability to crash, default is 0.3 (30%)"
1919
default: 0.3
20+
points_count:
21+
description: "Number of points to insert"
22+
default: 5000
2023

2124
env:
2225
CARGO_TERM_COLOR: always
@@ -43,9 +46,15 @@ jobs:
4346
crash_probability=0.3
4447
fi
4548
49+
points_count="${{ inputs.points_count }}"
50+
if [ -z "$points_count" ]; then
51+
points_count=500
52+
fi
53+
4654
echo "qdrant_version=$qdrant_version" >> $GITHUB_OUTPUT
4755
echo "crashing_time=$crashing_time" >> $GITHUB_OUTPUT
4856
echo "crash_probability=$crash_probability" >> $GITHUB_OUTPUT
57+
echo "points_count=$points_count" >> $GITHUB_OUTPUT
4958
- name: Install minimal stable
5059
uses: dtolnay/rust-toolchain@stable
5160
- name: Install mold
@@ -95,9 +104,10 @@ jobs:
95104
96105
crashing_time="${{ steps.default_inputs.outputs.crashing_time }}"
97106
crash_probability="${{ steps.default_inputs.outputs.crash_probability }}"
107+
points_count="${{ steps.default_inputs.outputs.points_count }}"
98108
backup_storage_dir="${{ format('{0}/qdrant/storage-backup', github.workspace) }}"
99109
100-
./crash-things.sh qdrant ../qdrant-src/target/debug/qdrant "$crash_probability" "$crashing_time" "$backup_storage_dir"
110+
./crash-things.sh qdrant ../qdrant-src/target/debug/qdrant "$crash_probability" "$crashing_time" "$points_count" "$backup_storage_dir"
101111
- name: Upload logs on failure
102112
uses: actions/upload-artifact@v4
103113
if: failure() || cancelled()

crash-things.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ QDRANT_DIR=${1:-./qdrant/}
66
QDRANT_EXEC=${2:-target/debug/qdrant}
77
CRASH_PROBABILITY=${3:-0.3}
88
RUN_TIME=${4:-300}
9-
QDRANT_BACKUP_DIR=${5:?backup directory is required}
9+
POINTS_COUNT=${5:-5000}
10+
QDRANT_BACKUP_DIR=${6:?backup directory is required}
1011

1112
CRASHER_LOG=crasher.log
1213
QDRANT_LOG=../qdrant.log
@@ -18,6 +19,7 @@ CRASHER_CMD=(
1819
--storage-backup $QDRANT_BACKUP_DIR
1920
--exec-path "$QDRANT_EXEC"
2021
--crash-probability "$CRASH_PROBABILITY"
22+
--points-count "$POINTS_COUNT"
2123
)
2224

2325
echo "${CRASHER_CMD[*]}"

0 commit comments

Comments
 (0)