Commit c99a7986 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Only log bytes/loop for TestReadLargeMemCheck.

parent 4baee921
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
"syscall" "syscall"
"testing" "testing"
"time" "time"
"unsafe"
) )
var _ = strings.Join var _ = strings.Join
...@@ -600,14 +599,7 @@ func TestReadLargeMemCheck(t *testing.T) { ...@@ -600,14 +599,7 @@ func TestReadLargeMemCheck(t *testing.T) {
runtime.ReadMemStats(&after) runtime.ReadMemStats(&after)
delta := int((after.TotalAlloc - before.TotalAlloc)) delta := int((after.TotalAlloc - before.TotalAlloc))
delta = (delta - 40000) / N delta = (delta - 40000) / N
t.Logf("bytes per read loop: %d", delta)
limit := 5000
if unsafe.Sizeof(uintptr(0)) == 8 {
limit = 10000
}
if delta > limit {
t.Errorf("bytes per loop: %d, limit %d", delta, limit)
}
} }
func TestReadLarge(t *testing.T) { func TestReadLarge(t *testing.T) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment