Skip to content

Commit 2b542d9

Browse files
Log
1 parent 3c6664c commit 2b542d9

File tree

1 file changed

+7
-2
lines changed
  • backend/src/backend/user_session/routers/surface

1 file changed

+7
-2
lines changed

backend/src/backend/user_session/routers/surface/router.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,17 @@ async def well_intersection_reals_from_user_session(
6868
coro_array.append(my_download_to_file(container_client=container_client, sumo_surf_uuid=uuid))
6969
res_array = await asyncio.gather(*coro_array)
7070
dl_time_s = timer.lap_s()
71-
print(f"download surfs: {dl_time_s:.2f}s")
71+
print(f"download surfs: {dl_time_s:.2f}s", flush=True)
72+
LOGGER.info(f"download surfs: {dl_time_s:.2f}s", extra={"download_surfs": dl_time_s})
7273

7374
tot_mb = 0
7475
for res in res_array:
7576
tot_mb += len(res) / (1024 * 1024)
76-
print(f"Total MB downloaded: {tot_mb:.2f}MB => {tot_mb/dl_time_s:.2f}MB/s")
77+
print(f"Total MB downloaded: {tot_mb:.2f}MB => {tot_mb/dl_time_s:.2f}MB/s", flush=True)
78+
LOGGER.info(
79+
f"Total MB downloaded: {tot_mb:.2f}MB => {tot_mb/dl_time_s:.2f}MB/s",
80+
extra={"total_mb": tot_mb, "mb_per_s": tot_mb / dl_time_s},
81+
)
7782

7883
surfs = [xtgeo.surface_from_file(BytesIO(bytestr), fformat="irap_binary") for bytestr in res_array]
7984
fence_arr = np.array(

0 commit comments

Comments
 (0)