Skip to content

Commit

Permalink
log more
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Nov 29, 2023
1 parent af48191 commit cc30b4d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions backend/src/backend/user_session/routers/surface/test_go.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,22 @@ def go_get_surface_blobs(sumo_token: str, case_uuid: str, object_ids: list[str])
size_bytes = len(res_string)
size_mb = size_bytes / (1024 * 1024)
data_map_b64 = json.loads(res_string)
speed_mbps = (size_bytes * 8) / (elapsed_get * 1024)
elapsed_decode = timer.lap_ms()
LOGGER.info(
f"Downloaded surfaces with Go: {timer.elapsed_ms()}ms ("
f"init go and query sumo={elapsed_init}ms, "
f"get={elapsed_get}ms, "
f"decode={elapsed_decode}ms, "
f"size_mb={size_mb:.2f}) ",
extra={"init": elapsed_init, "get": elapsed_get, "decode": elapsed_decode, "size_mb": size_mb},
f"size_mb={size_mb:.2f},"
f"speed_mbps={speed_mbps:.2f})",
extra={
"init": elapsed_init,
"get": elapsed_get,
"decode": elapsed_decode,
"size_mb": size_mb,
"speed_mbps": speed_mbps,
},
)
return data_map_b64
for object_id, b64_blob in data_map_b64.items():
Expand Down

0 comments on commit cc30b4d

Please sign in to comment.