Skip to content

Commit

Permalink
drop
Browse files Browse the repository at this point in the history
  • Loading branch information
nik9000 committed Sep 15, 2020
1 parent 5cd3531 commit 929297f
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
package org.elasticsearch.benchmark.search.aggregations.bucket.terms;

import org.apache.lucene.util.BytesRef;
import org.elasticsearch.Version;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.DelayableWriteable;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.search.DocValueFormat;
Expand All @@ -42,7 +39,6 @@
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -93,17 +89,4 @@ private StringTerms newTerms(boolean withNested) {
public DelayableWriteable<InternalAggregations> serialize() {
return results.asSerialized(InternalAggregations::readFrom, REGISTRY);
}

@Benchmark
public BytesReference serializeVint() throws IOException {
try (BytesStreamOutput buffer = new BytesStreamOutput()) {
buffer.setVersion(Version.CURRENT);
for (int i = 0; i < 1000000; i++) {
buffer.writeVInt(i * 31);
buffer.reset();
}
return buffer.bytes();
}
}

}

0 comments on commit 929297f

Please sign in to comment.