Skip to content

Commit 2973d61

Browse files
committed
changes from testing scripts in local environment
1 parent 030366a commit 2973d61

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

cache/__tests__/cache-metrics-worst-case.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ test_update_endpoint() {
628628
local full_object=$(curl -s "$test_id" 2>/dev/null)
629629

630630
# Modify the value
631-
local update_body=$(echo "$full_object" | jq ".value = \"updated_$i\"" 2>/dev/null)
631+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_$i\"}" 2>/dev/null)
632632

633633
# Measure ONLY the update operation
634634
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
@@ -677,7 +677,7 @@ test_update_endpoint() {
677677
local full_object=$(curl -s "$test_id" 2>/dev/null)
678678

679679
# Modify the value
680-
local update_body=$(echo "$full_object" | jq ".value = \"updated_full_$i\"" 2>/dev/null)
680+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_full_$i\"}" 2>/dev/null)
681681

682682
# Measure ONLY the update operation
683683
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
@@ -1793,7 +1793,7 @@ test_update_endpoint_empty() {
17931793

17941794
for i in $(seq 1 $NUM_ITERATIONS); do
17951795
local full_object=$(curl -s "$test_id" 2>/dev/null)
1796-
local update_body=$(echo "$full_object" | jq ".value = \"updated_$i\"" 2>/dev/null)
1796+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_$i\"}" 2>/dev/null)
17971797

17981798
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
17991799
"$update_body" \
@@ -1853,7 +1853,7 @@ test_update_endpoint_full() {
18531853

18541854
for i in $(seq 1 $NUM_ITERATIONS); do
18551855
local full_object=$(curl -s "$test_id" 2>/dev/null)
1856-
local update_body=$(echo "$full_object" | jq ".value = \"updated_full_$i\"" 2>/dev/null)
1856+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_full_$i\"}" 2>/dev/null)
18571857

18581858
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
18591859
"$update_body" \

cache/__tests__/cache-metrics.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ test_update_endpoint() {
647647
local full_object=$(curl -s "$test_id" 2>/dev/null)
648648

649649
# Modify the value
650-
local update_body=$(echo "$full_object" | jq ".value = \"updated_$i\"" 2>/dev/null)
650+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_$i\"}" 2>/dev/null)
651651

652652
# Measure ONLY the update operation
653653
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
@@ -696,7 +696,7 @@ test_update_endpoint() {
696696
local full_object=$(curl -s "$test_id" 2>/dev/null)
697697

698698
# Modify the value
699-
local update_body=$(echo "$full_object" | jq ".value = \"updated_full_$i\"" 2>/dev/null)
699+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_full_$i\"}" 2>/dev/null)
700700

701701
# Measure ONLY the update operation
702702
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
@@ -1811,7 +1811,7 @@ test_update_endpoint_empty() {
18111811

18121812
for i in $(seq 1 $NUM_ITERATIONS); do
18131813
local full_object=$(curl -s "$test_id" 2>/dev/null)
1814-
local update_body=$(echo "$full_object" | jq ".value = \"updated_$i\"" 2>/dev/null)
1814+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_$i\"}" 2>/dev/null)
18151815

18161816
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
18171817
"$update_body" \
@@ -1870,7 +1870,7 @@ test_update_endpoint_full() {
18701870

18711871
for i in $(seq 1 $NUM_ITERATIONS); do
18721872
local full_object=$(curl -s "$test_id" 2>/dev/null)
1873-
local update_body=$(echo "$full_object" | jq ".value = \"updated_full_$i\"" 2>/dev/null)
1873+
local update_body=$(echo "$full_object" | jq ". + {value: \"updated_full_$i\"}" 2>/dev/null)
18741874

18751875
local result=$(measure_endpoint "${API_BASE}/api/update" "PUT" \
18761876
"$update_body" \

0 commit comments

Comments
 (0)