Browse Source

Log sleep time.

Richard Crowley 12 years ago
parent
commit
90699f3f70
2 changed files with 6 additions and 2 deletions
  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)
 }