Skip to content

Commit

Permalink
feat: Add debug logs (#166)
Browse files Browse the repository at this point in the history
* feat: Add debug logs

* feat: Add file and func name in logs

* fix: Remove funcname
  • Loading branch information
KShivendu authored Aug 5, 2024
1 parent d82c2dc commit 2397444
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
3 changes: 2 additions & 1 deletion tools/qdrant_collect_stats.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
PS4='ts=$(date "+%Y-%m-%dT%H:%M:%SZ") level=DEBUG line=$LINENO file=$BASH_SOURCE '
set -euo pipefail

# Examples: qdrant-single-node, qdrant-single-node-rps
CONTAINER_NAME=$1
Expand Down
7 changes: 4 additions & 3 deletions tools/run_ci.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash

set -e
PS4='ts=$(date "+%Y-%m-%dT%H:%M:%SZ") level=DEBUG line=$LINENO file=$BASH_SOURCE '
set -euo pipefail

function handle_err() {
echo "Error occured ${QDRANT_VERSION@A} ${ENGINE_NAME@A} ${DATASETS@A}"
echo "Error occured qdrant_version=${QDRANT_VERSION} engine_name=${ENGINE_NAME} dataset=${DATASETS}"
echo "{failed}={error}" >> $GITHUB_OUTPUT
}

function handle_term() {
echo "Timeout occured ${QDRANT_VERSION@A} ${ENGINE_NAME@A} ${DATASETS@A}"
echo "Timeout occured qdrant_version=${QDRANT_VERSION} engine_name=${ENGINE_NAME} dataset=${DATASETS}"
echo "{failed}={timeout}" >> $GITHUB_OUTPUT
}

Expand Down
3 changes: 2 additions & 1 deletion tools/run_client_script.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
PS4='ts=$(date "+%Y-%m-%dT%H:%M:%SZ") level=DEBUG line=$LINENO file=$BASH_SOURCE '
set -euo pipefail

CLOUD_NAME=${CLOUD_NAME:-"hetzner"}
SERVER_USERNAME=${SERVER_USERNAME:-"root"}
Expand Down
3 changes: 2 additions & 1 deletion tools/run_experiment.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
PS4='ts=$(date "+%Y-%m-%dT%H:%M:%SZ") level=DEBUG line=$LINENO file=$BASH_SOURCE '
set -euo pipefail

ENGINE_NAME=${ENGINE_NAME:-"qdrant-continuous-benchmark"}

Expand Down
5 changes: 3 additions & 2 deletions tools/run_remote_benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

set -e
PS4='ts=$(date "+%Y-%m-%dT%H:%M:%SZ") level=DEBUG line=$LINENO file=$BASH_SOURCE '
set -euo pipefail

# Setup 2 machines in Hetzner Cloud
# One machine will be used as a server, another one as a client

cleanup() {
echo "cleaning up..."
echo "cleaning up file=$BASH_SOURCE"
# bash -x "${SCRIPT_PATH}/tear_down.sh"
}

Expand Down
3 changes: 2 additions & 1 deletion tools/run_server_container.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

set -e
PS4='ts=$(date "+%Y-%m-%dT%H:%M:%SZ") level=DEBUG line=$LINENO file=$BASH_SOURCE '
set -euo pipefail

# Examples: qdrant-continuous-benchmarks
CONTAINER_NAME=$1
Expand Down

0 comments on commit 2397444

Please sign in to comment.