Skip to content

Commit

Permalink
refine timedetail string
Browse files Browse the repository at this point in the history
Signed-off-by: crazycs520 <[email protected]>
  • Loading branch information
crazycs520 committed Apr 3, 2024
1 parent c2927c0 commit cf99334
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions util/execdetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,10 @@ func (td *TimeDetail) String() string {
buf.WriteString("tikv_wall_time: ")
buf.WriteString(FormatDuration(td.TotalRPCWallTime))
}
buf.WriteString("}")
return buf.String()
if buf.Len() == 0 {
return ""
}
return "time_detail: {" + buf.String() + "}"
}

// Merge merges the time detail into itself.
Expand Down

0 comments on commit cf99334

Please sign in to comment.