Skip to content

Commit

Permalink
fix: 图像数据处理计时错误
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafYeeXYZ committed Oct 9, 2024
1 parent 14db504 commit 2642eb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plots/BasicBoxPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function BasicBoxPlot() {
setCustomXLabel(values.xLabel || '')
setCustomYLabel(values.yLabel || '')
messageApi?.destroy()
messageApi?.success(`数据处理完成, 用时 ${Date.now() - timestamp} 毫秒`)
messageApi?.success(`数据处理完成, 用时 ${Date.now() - timestamp - (isLargeData ? 500 : 0)} 毫秒`)
} catch (error) {
messageApi?.destroy()
messageApi?.error(`数据处理失败: ${error instanceof Error ? error.message : JSON.stringify(error)}`)
Expand Down
2 changes: 1 addition & 1 deletion src/plots/BasicScatterPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function BasicScatterPlot() {
setCustomYLabel(values.yLabel || '')
setCustomZLabel(values.zLabel || '')
messageApi?.destroy()
messageApi?.success(`数据处理完成, 用时 ${Date.now() - timestamp} 毫秒`)
messageApi?.success(`数据处理完成, 用时 ${Date.now() - timestamp - (isLargeData ? 500 : 0)} 毫秒`)
} catch (error) {
messageApi?.destroy()
messageApi?.error(`数据处理失败: ${error instanceof Error ? error.message : JSON.stringify(error)}`)
Expand Down

0 comments on commit 2642eb7

Please sign in to comment.