Skip to content

Commit 3ffd10b

Browse files
committed
Refactor: move HardwareUsage to the Usage map
1 parent b6aff10 commit 3ffd10b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/consensus_tests/test_hw_measurement.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def test_measuring_hw_for_updates(tmp_path: pathlib.Path):
9393
total_vector_io_write_old = sum([x["vector_io_write"] for x in peer_hw_infos])
9494

9595
# Update 20 points
96-
update_payload_hw_data = update_points_payload(peer_urls[0], collection_name=COLLECTION_NAME, points=[x for x in range(N_PEERS*20)])["usage"]
97-
update_vectors_hw_data = update_points_vector(peer_urls[0], collection_name=COLLECTION_NAME, points=[x for x in range(N_PEERS*20)])["usage"]
96+
update_payload_hw_data = update_points_payload(peer_urls[0], collection_name=COLLECTION_NAME, points=[x for x in range(N_PEERS*20)])["usage"]["hardware"]
97+
update_vectors_hw_data = update_points_vector(peer_urls[0], collection_name=COLLECTION_NAME, points=[x for x in range(N_PEERS*20)])["usage"]["hardware"]
9898

9999
total_payload_io_write = 0
100100
total_vector_io_write = 0
@@ -194,7 +194,7 @@ def test_payload_io_read_is_within_limit(tmp_path: pathlib.Path, test_item):
194194
f"{peer_api_uris[0]}/collections/test_collection/points/{test_item.get('path')}",
195195
json=test_item.get('json')
196196
)
197-
print(res.json().get('usage'))
198-
payload_io_read = res.json().get('usage', {}).get('payload_io_read')
199-
assert payload_io_read is not None, "payload_io_read is not found in usage"
197+
print(res.json().get('usage', {}).get('hardware'))
198+
payload_io_read = res.json().get('usage', {}).get('hardware', {}).get('payload_io_read')
199+
assert payload_io_read is not None, "payload_io_read is not found in usage.hardware"
200200
assert payload_io_read < 300, f"payload_io_read={payload_io_read} is not within limit"

0 commit comments

Comments
 (0)