Commit a7c1a147 authored by Aaron Jacobs's avatar Aaron Jacobs

buffer_test: fix build errors.

parent 0a22738a
...@@ -304,7 +304,7 @@ func BenchmarkOutMessageReset(b *testing.B) { ...@@ -304,7 +304,7 @@ func BenchmarkOutMessageReset(b *testing.B) {
om.Reset() om.Reset()
} }
b.SetBytes(int64(unsafe.Offsetof(om.storage)) + int64(om.offset)) b.SetBytes(int64(unsafe.Offsetof(om.payload)))
}) })
// Many megabytes worth of buffers, which should defeat the CPU cache. // Many megabytes worth of buffers, which should defeat the CPU cache.
...@@ -321,7 +321,7 @@ func BenchmarkOutMessageReset(b *testing.B) { ...@@ -321,7 +321,7 @@ func BenchmarkOutMessageReset(b *testing.B) {
oms[i%numMessages].Reset() oms[i%numMessages].Reset()
} }
b.SetBytes(int64(unsafe.Offsetof(oms[0].storage)) + int64(oms[0].offset)) b.SetBytes(int64(unsafe.Offsetof(oms[0].payload)))
}) })
} }
......
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