Change TopNQueryRunnerBenchmark to use a ByteBuffer as per OffheapBufferPool

This commit is contained in:
Charles Allen 2014-11-10 15:40:54 -08:00
parent a093f3728a
commit 92e71be864
1 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,7 @@ import java.nio.ByteBuffer;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
/** /**
* Based on TopNQueryRunnerTest * Based on TopNQueryRunnerTest
@ -93,7 +94,9 @@ public class TopNQueryRunnerBenchmark extends AbstractBenchmark
@Override @Override
public ByteBuffer get() public ByteBuffer get()
{ {
return ByteBuffer.allocate(2000); // See OffheapByteBufferPool
// Instead of causing a circular dependency, we simply mimic its behavior
return ByteBuffer.allocateDirect(2000);
} }
} }
), ),