mirror of https://github.com/apache/druid.git
Change TopNQueryRunnerBenchmark to use a ByteBuffer as per OffheapBufferPool
This commit is contained in:
parent
a093f3728a
commit
92e71be864
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue