소스 검색

Log sleep time.

Richard Crowley 12 년 전
부모
커밋
90699f3f70
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 1
      debug_test.go
  2. 3 1
      runtime_test.go

+ 3 - 1
debug_test.go

@@ -26,7 +26,9 @@ func TestDebugGCStatsBlocking(t *testing.T) {
 	t1 := time.Now()
 	t.Log("i++ during debug.ReadGCStats:", <-ch)
 	go testDebugGCStatsBlocking(ch)
-	time.Sleep(t1.Sub(t0))
+	d := t1.Sub(t0)
+	t.Log(d)
+	time.Sleep(d)
 	t.Log("i++ during time.Sleep:", <-ch)
 }
 

+ 3 - 1
runtime_test.go

@@ -25,7 +25,9 @@ func TestRuntimeMemStatsBlocking(t *testing.T) {
 	t1 := time.Now()
 	t.Log("i++ during runtime.ReadMemStats:", <-ch)
 	go testRuntimeMemStatsBlocking(ch)
-	time.Sleep(t1.Sub(t0))
+	d := t1.Sub(t0)
+	t.Log(d)
+	time.Sleep(d)
 	t.Log("i++ during time.Sleep:", <-ch)
 }