11package com .clickhouse .benchmark ;
22
3+ import com .clickhouse .benchmark .clients .Compression ;
34import com .clickhouse .benchmark .clients .ConcurrentInsertClient ;
45import com .clickhouse .benchmark .clients .ConcurrentQueryClient ;
6+ import com .clickhouse .benchmark .clients .Deserializers ;
7+ import com .clickhouse .benchmark .clients .InsertClient ;
8+ import com .clickhouse .benchmark .clients .QueryClient ;
9+ import com .clickhouse .benchmark .clients .Serializers ;
510import org .openjdk .jmh .annotations .Mode ;
611import org .openjdk .jmh .profile .GCProfiler ;
712import org .openjdk .jmh .profile .MemPoolProfiler ;
@@ -28,13 +33,13 @@ public static void main(String[] args) throws Exception {
2833 Map <String , String > argMap = parseArguments (args );
2934
3035 Options opt = new OptionsBuilder ()
31- // .include(QueryClient.class.getSimpleName())
32- // .include(InsertClient.class.getSimpleName())
36+ .include (QueryClient .class .getSimpleName ())
37+ .include (InsertClient .class .getSimpleName ())
3338 .include (ConcurrentInsertClient .class .getSimpleName ())
3439 .include (ConcurrentQueryClient .class .getSimpleName ())
35- // .include(Compression.class.getSimpleName())
36- // .include(Serializers.class.getSimpleName())
37- // .include(Deserializers.class.getSimpleName())
40+ .include (Compression .class .getSimpleName ())
41+ .include (Serializers .class .getSimpleName ())
42+ .include (Deserializers .class .getSimpleName ())
3843 .forks (1 ) // must be a fork. No fork only for debugging
3944 .mode (Mode .SampleTime )
4045 .timeUnit (TimeUnit .MILLISECONDS )
@@ -43,10 +48,10 @@ public static void main(String[] args) throws Exception {
4348 .warmupIterations (1 )
4449 .warmupTime (TimeValue .seconds (5 ))
4550 .measurementIterations (3 )
46- .jvmArgs ("-Xms10g " , "-Xmx10g " )
51+ .jvmArgs ("-Xms8g " , "-Xmx8g " )
4752 .measurementTime (TimeValue .seconds (isCloud () ? 30 : 5 ))
4853 .resultFormat (ResultFormatType .JSON )
49- // .output(String.format("jmh-results-%s-%s.out", isCloud() ? "cloud" : "local", System.currentTimeMillis()))
54+ .output (String .format ("jmh-results-%s-%s.out" , isCloud () ? "cloud" : "local" , System .currentTimeMillis ()))
5055 .result (String .format ("jmh-results-%s-%s.json" , isCloud () ? "cloud" : "local" , System .currentTimeMillis ()))
5156 .build ();
5257
@@ -74,6 +79,10 @@ public static String getSelectQuery(String tableName) {
7479 return "SELECT * FROM `" + DB_NAME + "`.`" + tableName + "`" ;
7580 }
7681
82+ public static String getSelectQueryWithLimit (String tableName , int limit ) {
83+ return "SELECT * FROM `" + DB_NAME + "`.`" + tableName + "` LIMIT " + limit ;
84+ }
85+
7786 public static String getSelectCountQuery (String tableName ) {
7887 return String .format ("SELECT COUNT(*) FROM `%s`.`%s`" , DB_NAME , tableName );
7988 }
0 commit comments