Skip to content

Commit

Permalink
refine test
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 0d7b8dc commit 597daf1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions util/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,12 @@ func TestCompatibleParseGCTime(t *testing.T) {
func TestTimeDetail(t *testing.T) {
detail := &TimeDetail{KvReadWallTime: time.Millisecond * 2, TotalRPCWallTime: time.Millisecond * 3}
assert.Equal(t, "time_detail: {total_kv_read_wall_time: 2ms, tikv_wall_time: 3ms}", detail.String())
detail = &TimeDetail{
ProcessTime: time.Millisecond * 2,
SuspendTime: time.Millisecond * 3,
WaitTime: time.Millisecond * 4,
KvReadWallTime: time.Millisecond * 5,
TotalRPCWallTime: time.Millisecond * 6,
}
assert.Equal(t, "time_detail: {total_process_time: 2ms, total_suspend_time: 3ms, total_wait_time: 4ms, total_kv_read_wall_time: 5ms, tikv_wall_time: 6ms}", detail.String())
}

0 comments on commit 597daf1

Please sign in to comment.