tech.clickhouse.benchmark.Insertion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickhouse-benchmark Show documentation
Show all versions of clickhouse-benchmark Show documentation
Benchmarks for ClickHouse clients
The newest version!
package tech.clickhouse.benchmark;
import java.sql.Timestamp;
// import java.util.Collections;
import java.util.Enumeration;
import java.util.Random;
import org.openjdk.jmh.annotations.Benchmark;
public class Insertion extends JdbcBenchmark {
// @Benchmark
// public int insertOneNumber(ClientState state) throws Throwable {
// return executeInsert(state, "insert into test_insert(i) values(?)",
// Collections.enumeration(Collections.singletonList(new Object[] { new
// Random().nextInt(1000) })));
// }
@Benchmark
public int insert10kUInt64Rows(ClientState state) throws Throwable {
final int rows = 10000;
final int num = new Random().nextInt(rows);
return executeInsert(state, "insert into system.test_insert(i) values(?)", new Enumeration