Skip to content

Commit

Permalink
test: Added result-set encoding benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Ruaux committed Jan 24, 2023
1 parent d8f987b commit 420ee64
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@

public class CodecBenchmark {

// @Benchmark
// @BenchmarkMode(Mode.AverageTime)
// public void explicitEncode(CodecExecutionPlan plan) throws SQLException {
// plan.getExplicitCodec().encodeValue(plan.newRowSet()).array();
// }
//
// @Benchmark
// @BenchmarkMode(Mode.AverageTime)
// public void jdkEncode(CodecExecutionPlan plan) throws IOException, SQLException {
// plan.getJdkCodec().encode(plan.newRowSet());
// }
@Benchmark
@BenchmarkMode(Mode.AverageTime)
public void explicitEncode(CodecExecutionPlan plan) throws SQLException {
plan.getExplicitCodec().encodeValue(plan.newRowSet()).array();
}

@Benchmark
@BenchmarkMode(Mode.AverageTime)
public void jdkEncode(CodecExecutionPlan plan) throws IOException, SQLException {
plan.getJdkCodec().encode(plan.newRowSet());
}

@Benchmark
@BenchmarkMode(Mode.AverageTime)
public void explicitDecode(CodecExecutionPlan plan) throws IOException, SQLException, ClassNotFoundException {
public void explicitDecode(CodecExecutionPlan plan) {
plan.getExplicitCodec().decodeValue(plan.getExplicitByteBufer());
}

Expand Down

0 comments on commit 420ee64

Please sign in to comment.