|
3 | 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
4 | 4 | <modelVersion>4.0.0</modelVersion> |
5 | 5 |
|
6 | | - <parent> |
7 | | - <groupId>com.clickhouse</groupId> |
8 | | - <artifactId>clickhouse-java</artifactId> |
9 | | - <version>${revision}</version> |
10 | | - </parent> |
11 | | - |
12 | | - <artifactId>java-performance</artifactId> |
| 6 | + <artifactId>jmh-benchmark</artifactId> |
| 7 | + <groupId>clickhouse.com</groupId> |
| 8 | + <version>0.1-SNAPSHOT</version> |
13 | 9 | <packaging>jar</packaging> |
14 | 10 |
|
15 | | - <name>ClickHouse Java Performance Tests</name> |
16 | | - <description>ClickHouse Java Performance Tests</description> |
| 11 | + <name>JMH Benchmark for Java Client</name> |
| 12 | + <description>JMH Benchmark for Java Client</description> |
17 | 13 | <url>https://github.com/ClickHouse/clickhouse-java/tree/main/performance</url> |
18 | 14 |
|
19 | 15 | <properties> |
20 | 16 | <apache.httpclient.version>5.3.1</apache.httpclient.version> |
21 | | - <shade.base>${project.groupId}.shaded</shade.base> |
| 17 | + <slf4j.version>2.0.17</slf4j.version> |
| 18 | + <ch.jdbc.revision>0.8.2-SNAPSHOT</ch.jdbc.revision> |
| 19 | + <jmh.version>1.37</jmh.version> |
| 20 | + <testcontainers.version>1.20.6</testcontainers.version> |
| 21 | + |
| 22 | + <antrun-plugin.version>3.1.0</antrun-plugin.version> |
| 23 | + <assembly-plugin.version>3.6.0</assembly-plugin.version> |
| 24 | + <clean-plugin.version>3.3.1</clean-plugin.version> |
| 25 | + <compiler-plugin.version>3.13.0</compiler-plugin.version> |
| 26 | + <deploy-plugin.version>3.1.1</deploy-plugin.version> |
| 27 | + <enforcer-plugin.version>3.3.0</enforcer-plugin.version> |
| 28 | + <exec-plugin.version>3.5.0</exec-plugin.version> |
| 29 | + <failsafe-plugin.version>3.1.2</failsafe-plugin.version> |
| 30 | + <flatten-plugin.version>1.2.7</flatten-plugin.version> |
| 31 | + <git-plugin.version>6.0.0</git-plugin.version> |
| 32 | + <gpg-plugin.version>3.1.0</gpg-plugin.version> |
| 33 | + <helper-plugin.version>3.4.0</helper-plugin.version> |
| 34 | + <jacoco-plugin.version>0.8.12</jacoco-plugin.version> |
| 35 | + <jar-plugin.version>3.3.0</jar-plugin.version> |
| 36 | + <javadoc-plugin.version>3.5.0</javadoc-plugin.version> |
| 37 | + <native-plugin.version>0.9.23</native-plugin.version> |
| 38 | + <os-plugin.version>1.7.1</os-plugin.version> |
| 39 | + <protobuf-plugin.version>0.6.1</protobuf-plugin.version> |
| 40 | + <shade-plugin.version>3.5.0</shade-plugin.version> |
| 41 | + <source-plugin.version>3.2.1</source-plugin.version> |
| 42 | + <staging-plugin.version>1.6.13</staging-plugin.version> |
| 43 | + <surefire-plugin.version>3.2.5</surefire-plugin.version> |
| 44 | + <toolchains-plugin.version>3.1.0</toolchains-plugin.version> |
| 45 | + <versions-plugin.version>2.16.0</versions-plugin.version> |
| 46 | + <resource-plugin.version>3.3.1</resource-plugin.version> |
| 47 | + |
| 48 | + <jmh.measure-iter>10</jmh.measure-iter> |
| 49 | + <jmh.measure-time>10</jmh.measure-time> |
| 50 | + |
22 | 51 | </properties> |
23 | 52 |
|
24 | 53 | <dependencies> |
|
42 | 71 | <artifactId>jmh-generator-annprocess</artifactId> |
43 | 72 | <version>${jmh.version}</version> |
44 | 73 | </dependency> |
45 | | - <dependency> |
46 | | - <groupId>org.testng</groupId> |
47 | | - <artifactId>testng</artifactId> |
48 | | - <version>${testng.version}</version> |
49 | | - </dependency> |
| 74 | + |
| 75 | + <!-- Performance Test Dependencies --> |
| 76 | +<!-- <dependency>--> |
| 77 | +<!-- <groupId>org.testcontainers</groupId>--> |
| 78 | +<!-- <artifactId>testcontainers</artifactId>--> |
| 79 | +<!-- <version>${testcontainers.version}</version>--> |
| 80 | +<!-- <scope>compile</scope>--> |
| 81 | +<!-- </dependency>--> |
50 | 82 | <!-- https://mvnrepository.com/artifact/org.testcontainers/clickhouse --> |
51 | 83 | <dependency> |
52 | 84 | <groupId>org.testcontainers</groupId> |
53 | 85 | <artifactId>clickhouse</artifactId> |
54 | 86 | <version>${testcontainers.version}</version> |
55 | 87 | </dependency> |
56 | 88 |
|
57 | | - |
58 | | - <!-- Performance Test Dependencies --> |
| 89 | + <!-- Contains both JDBC drivers and clients --> |
59 | 90 | <dependency> |
60 | | - <groupId>${project.parent.groupId}</groupId> |
61 | | - <artifactId>clickhouse-client</artifactId> |
62 | | - <version>${revision}</version> |
63 | | - </dependency> |
64 | | - <dependency> |
65 | | - <groupId>${project.parent.groupId}</groupId> |
66 | | - <artifactId>clickhouse-client</artifactId> |
67 | | - <version>${revision}</version> |
68 | | - <type>test-jar</type> |
69 | | - </dependency> |
70 | | - <dependency> |
71 | | - <groupId>org.testcontainers</groupId> |
72 | | - <artifactId>testcontainers</artifactId> |
73 | | - <version>${testcontainers.version}</version> |
74 | | - </dependency> |
75 | | - <dependency> |
76 | | - <groupId>${project.parent.groupId}</groupId> |
77 | | - <artifactId>clickhouse-http-client</artifactId> |
78 | | - <version>${revision}</version> |
79 | | - </dependency> |
80 | | - <dependency> |
81 | | - <groupId>${project.parent.groupId}</groupId> |
82 | | - <artifactId>client-v2</artifactId> |
83 | | - <version>${revision}</version> |
84 | | - </dependency> |
85 | | - <dependency> |
86 | | - <groupId>${project.parent.groupId}</groupId> |
| 91 | + <groupId>com.clickhouse</groupId> |
87 | 92 | <artifactId>clickhouse-jdbc</artifactId> |
88 | | - <version>${revision}</version> |
89 | | - </dependency> |
90 | | - <dependency> |
91 | | - <groupId>${project.parent.groupId}</groupId> |
92 | | - <artifactId>jdbc-v2</artifactId> |
93 | | - <version>${revision}</version> |
| 93 | + <version>${ch.jdbc.revision}</version> |
| 94 | + <classifier>all</classifier> |
94 | 95 | </dependency> |
| 96 | + |
95 | 97 | </dependencies> |
96 | 98 |
|
97 | 99 | <build> |
98 | 100 | <plugins> |
99 | 101 | <plugin> |
100 | 102 | <groupId>org.apache.maven.plugins</groupId> |
101 | 103 | <artifactId>maven-compiler-plugin</artifactId> |
| 104 | + <version>${compiler-plugin.version}</version> |
102 | 105 | <configuration> |
103 | 106 | <annotationProcessorPaths> |
104 | 107 | <path> |
|
115 | 118 | <release>11</release> |
116 | 119 | </configuration> |
117 | 120 | </plugin> |
118 | | - <plugin> |
119 | | - <groupId>org.apache.maven.plugins</groupId> |
120 | | - <artifactId>maven-shade-plugin</artifactId> |
121 | | - <executions> |
122 | | - <execution> |
123 | | - <phase>package</phase> |
124 | | - <goals> |
125 | | - <goal>shade</goal> |
126 | | - </goals> |
127 | | - <configuration> |
128 | | - <finalName>benchmarks</finalName> |
129 | | - <transformers> |
130 | | - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
131 | | - <mainClass>com.clickhouse.benchmark.BenchmarkRunner</mainClass> |
132 | | - </transformer> |
133 | | - </transformers> |
134 | | - </configuration> |
135 | | - </execution> |
136 | | - </executions> |
137 | | - </plugin> |
138 | 121 | <plugin> |
139 | 122 | <groupId>org.codehaus.mojo</groupId> |
140 | 123 | <artifactId>build-helper-maven-plugin</artifactId> |
|
164 | 147 | </descriptorRefs> |
165 | 148 | <archive> |
166 | 149 | <manifest> |
167 | | - <mainClass>com.clickhouse.benchmark.BenchmarkRunner</mainClass> |
| 150 | + <mainClass>com.clickhouse.com.clickhouse.benchmark.BenchmarkRunner</mainClass> |
168 | 151 | </manifest> |
169 | 152 | </archive> |
170 | 153 | </configuration> |
|
181 | 164 | <plugin> |
182 | 165 | <groupId>org.codehaus.mojo</groupId> |
183 | 166 | <artifactId>exec-maven-plugin</artifactId> |
| 167 | + <version>${exec-plugin.version}</version> |
184 | 168 | <executions> |
185 | 169 | <execution> |
186 | 170 | <id>run-benchmarks</id> |
187 | | - <phase>integration-test</phase> |
188 | 171 | <goals> |
189 | 172 | <goal>exec</goal> |
190 | 173 | </goals> |
191 | 174 | <configuration> |
192 | | - <classpathScope>test</classpathScope> |
193 | 175 | <executable>java</executable> |
194 | 176 | <arguments> |
195 | 177 | <argument>-classpath</argument> |
196 | | - <classpath /> |
| 178 | + <classpath/> |
197 | 179 | <argument>com.clickhouse.benchmark.BenchmarkRunner</argument> |
198 | | - <argument>.*</argument> |
| 180 | + <argument>-m ${jmh.measure-iter}</argument> |
| 181 | + <argument>-t ${jmh.measure-time}</argument> |
199 | 182 | </arguments> |
200 | 183 | </configuration> |
201 | 184 | </execution> |
|
0 commit comments