Skip to content

Commit 645f3a5

Browse files
authored
Merge pull request #2195 from ClickHouse/refactoring-performance-tests
Refactoring and adding DataSet, merging so we can build off of this in additional PRs
2 parents 4677774 + 78b5b42 commit 645f3a5

File tree

22 files changed

+1544
-498
lines changed

22 files changed

+1544
-498
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@ profile.html
5353

5454
# test configuration
5555
**/test/resources/test.properties
56+
performance/jmh-simple-results.json
57+
*.csv

clickhouse-client/src/test/java/com/clickhouse/client/ClickHouseServerForTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,15 @@ public static Network getNetwork() {
311311
return network;
312312
}
313313

314+
public static String getUsername() {
315+
// For cloud, the username is set in environment variable
316+
if (isCloud) {
317+
return System.getenv("CLICKHOUSE_CLOUD_USERNAME") == null ? "default" : System.getenv("CLICKHOUSE_CLOUD_USERNAME");
318+
} else {
319+
return "default";
320+
}
321+
}
322+
314323
public static String getPassword() {
315324
// For cloud, the password is set in environment variable
316325
if (isCloud) {

clickhouse-http-client/pom.xml

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -173,104 +173,4 @@
173173
</plugin>
174174
</plugins>
175175
</build>
176-
177-
178-
<profiles>
179-
<profile>
180-
<id>performance-testing</id>
181-
<activation><activeByDefault>false</activeByDefault></activation>
182-
<dependencies>
183-
<dependency>
184-
<groupId>org.openjdk.jmh</groupId>
185-
<artifactId>jmh-core</artifactId>
186-
<version>${jmh.version}</version>
187-
</dependency>
188-
<dependency>
189-
<groupId>org.openjdk.jmh</groupId>
190-
<artifactId>jmh-generator-annprocess</artifactId>
191-
<version>${jmh.version}</version>
192-
</dependency>
193-
</dependencies>
194-
<build>
195-
<plugins>
196-
<plugin>
197-
<groupId>org.apache.maven.plugins</groupId>
198-
<artifactId>maven-compiler-plugin</artifactId>
199-
<configuration>
200-
<annotationProcessorPaths>
201-
<path>
202-
<groupId>org.openjdk.jmh</groupId>
203-
<artifactId>jmh-generator-annprocess</artifactId>
204-
<version>${jmh.version}</version>
205-
</path>
206-
</annotationProcessorPaths>
207-
<release>8</release>
208-
</configuration>
209-
</plugin>
210-
<plugin>
211-
<groupId>org.apache.maven.plugins</groupId>
212-
<artifactId>maven-shade-plugin</artifactId>
213-
<executions>
214-
<execution>
215-
<phase>package</phase>
216-
<goals>
217-
<goal>shade</goal>
218-
</goals>
219-
<configuration>
220-
<finalName>benchmarks</finalName>
221-
<transformers>
222-
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
223-
<mainClass>org.openjdk.jmh.Main</mainClass>
224-
</transformer>
225-
</transformers>
226-
</configuration>
227-
</execution>
228-
</executions>
229-
</plugin>
230-
<plugin>
231-
<groupId>org.codehaus.mojo</groupId>
232-
<artifactId>exec-maven-plugin</artifactId>
233-
<executions>
234-
<execution>
235-
<id>run-benchmarks</id>
236-
<phase>integration-test</phase>
237-
<goals>
238-
<goal>exec</goal>
239-
</goals>
240-
<configuration>
241-
<classpathScope>test</classpathScope>
242-
<executable>java</executable>
243-
<arguments>
244-
<argument>-classpath</argument>
245-
<classpath />
246-
<argument>org.openjdk.jmh.Main</argument>
247-
<argument>.*</argument>
248-
</arguments>
249-
</configuration>
250-
</execution>
251-
</executions>
252-
</plugin>
253-
<plugin>
254-
<groupId>org.codehaus.mojo</groupId>
255-
<artifactId>build-helper-maven-plugin</artifactId>
256-
<version>3.6.0</version>
257-
<executions>
258-
<execution>
259-
<id>add-test-source</id>
260-
<phase>generate-test-sources</phase>
261-
<goals>
262-
<goal>add-test-source</goal>
263-
</goals>
264-
<configuration>
265-
<sources>
266-
<source>src/test/perf</source>
267-
</sources>
268-
</configuration>
269-
</execution>
270-
</executions>
271-
</plugin>
272-
</plugins>
273-
</build>
274-
</profile>
275-
</profiles>
276176
</project>

clickhouse-http-client/src/test/perf/com/clickhouse/client/ClientBenchmark.java

Lines changed: 0 additions & 84 deletions
This file was deleted.

client-v2/pom.xml

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -280,109 +280,4 @@
280280
</plugin>
281281
</plugins>
282282
</build>
283-
284-
<profiles>
285-
<profile>
286-
<id>performance-testing</id>
287-
<activation><activeByDefault>false</activeByDefault></activation>
288-
<dependencies>
289-
<dependency>
290-
<groupId>org.openjdk.jmh</groupId>
291-
<artifactId>jmh-core</artifactId>
292-
<version>${jmh.version}</version>
293-
</dependency>
294-
<dependency>
295-
<groupId>org.openjdk.jmh</groupId>
296-
<artifactId>jmh-generator-annprocess</artifactId>
297-
<version>${jmh.version}</version>
298-
</dependency>
299-
</dependencies>
300-
<build>
301-
<plugins>
302-
<plugin>
303-
<groupId>org.apache.maven.plugins</groupId>
304-
<artifactId>maven-compiler-plugin</artifactId>
305-
<configuration>
306-
<annotationProcessorPaths>
307-
<path>
308-
<groupId>org.projectlombok</groupId>
309-
<artifactId>lombok</artifactId>
310-
<version>1.18.32</version>
311-
</path>
312-
<path>
313-
<groupId>org.openjdk.jmh</groupId>
314-
<artifactId>jmh-generator-annprocess</artifactId>
315-
<version>${jmh.version}</version>
316-
</path>
317-
</annotationProcessorPaths>
318-
<release>8</release>
319-
</configuration>
320-
</plugin>
321-
<plugin>
322-
<groupId>org.apache.maven.plugins</groupId>
323-
<artifactId>maven-shade-plugin</artifactId>
324-
<executions>
325-
<execution>
326-
<phase>package</phase>
327-
<goals>
328-
<goal>shade</goal>
329-
</goals>
330-
<configuration>
331-
<finalName>benchmarks</finalName>
332-
<transformers>
333-
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
334-
<mainClass>org.openjdk.jmh.Main</mainClass>
335-
</transformer>
336-
</transformers>
337-
</configuration>
338-
</execution>
339-
</executions>
340-
</plugin>
341-
<plugin>
342-
<groupId>org.codehaus.mojo</groupId>
343-
<artifactId>build-helper-maven-plugin</artifactId>
344-
<version>3.6.0</version>
345-
<executions>
346-
<execution>
347-
<id>add-test-source</id>
348-
<phase>generate-test-sources</phase>
349-
<goals>
350-
<goal>add-test-source</goal>
351-
</goals>
352-
<configuration>
353-
<sources>
354-
<source>src/test/perf</source>
355-
</sources>
356-
</configuration>
357-
</execution>
358-
</executions>
359-
</plugin>
360-
<plugin>
361-
<groupId>org.codehaus.mojo</groupId>
362-
<artifactId>exec-maven-plugin</artifactId>
363-
<executions>
364-
<execution>
365-
<id>run-benchmarks</id>
366-
<phase>integration-test</phase>
367-
<goals>
368-
<goal>exec</goal>
369-
</goals>
370-
<configuration>
371-
<classpathScope>test</classpathScope>
372-
<executable>java</executable>
373-
<arguments>
374-
<argument>-classpath</argument>
375-
<classpath />
376-
<argument>org.openjdk.jmh.Main</argument>
377-
<argument>.*</argument>
378-
</arguments>
379-
</configuration>
380-
</execution>
381-
</executions>
382-
</plugin>
383-
</plugins>
384-
</build>
385-
</profile>
386-
</profiles>
387-
388283
</project>

0 commit comments

Comments
 (0)