From 20ebe02e4e5561ffd9d6b1d2c6b08e73a23c732e Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 16:24:59 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/ws_render_image.go | 4 ++++ utils/websocket_data/render_data.go | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/ws_render_image.go b/server/websocket/internal/logic/ws_render_image.go index 3c9a1994..395176d6 100644 --- a/server/websocket/internal/logic/ws_render_image.go +++ b/server/websocket/internal/logic/ws_render_image.go @@ -191,6 +191,10 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) { w.sendToOutChan(w.respondDataFormat(constants.WEBSOCKET_COMBINE_IMAGE, websocket_data.CombineImageRspMsg{ RenderId: renderImageData.RenderId, CombineImage: combineImage, + CombineProcessTime: websocket_data.CombineProcessTime{ + CombineTakesTime: fmt.Sprintf("%dms", res.DiffTimeLogoCombine), + UploadCombineImageTakesTime: fmt.Sprintf("%dms", res.DiffTimeUploadFile), + }, })) //如果是传入了指定尺寸,则不走unity if renderImageData.RenderData.SizeId > 0 { diff --git a/utils/websocket_data/render_data.go b/utils/websocket_data/render_data.go index 3b2f7065..698981e0 100644 --- a/utils/websocket_data/render_data.go +++ b/utils/websocket_data/render_data.go @@ -41,6 +41,11 @@ type RenderProcessTime struct { // 合图返回数据 type CombineImageRspMsg struct { - RenderId string `json:"render_id"` //渲染id - CombineImage string `json:"combine_image"` //刀版图 + RenderId string `json:"render_id"` //渲染id + CombineImage string `json:"combine_image"` //刀版图 + CombineProcessTime CombineProcessTime `json:"combine_process_time"` +} +type CombineProcessTime struct { + CombineTakesTime string `json:"combine_takes_time"` //合图时间 + UploadCombineImageTakesTime string `json:"upload_combine_image_takes_time"` //上传刀版图耗时 }