-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4271 from vespa-engine/hmusum/move-test-3
Move test from internal repo
- Loading branch information
Showing
5 changed files
with
27,181 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
tests/performance/container/query_profile_compilation/project/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.yahoo.vespa.systemtest</groupId> | ||
<artifactId>test</artifactId> | ||
<version>1.0</version> | ||
|
||
<parent> | ||
<groupId>com.yahoo.vespa.systemtest</groupId> | ||
<artifactId>test-apps-parent</artifactId> | ||
<version>8-SNAPSHOT</version> | ||
<relativePath/> | ||
</parent> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.yahoo.vespa</groupId> | ||
<artifactId>vespajlib</artifactId> | ||
<version>${vespa.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.yahoo.vespa</groupId> | ||
<artifactId>container-dev</artifactId> | ||
<version>${vespa.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<properties> | ||
<vespa.version>8-SNAPSHOT</vespa.version> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<release>17</release> | ||
<showWarnings>true</showWarnings> | ||
<optimize>true</optimize> | ||
<showDeprecation>false</showDeprecation> | ||
<compilerArgs> | ||
<arg>-Xlint:all</arg> | ||
</compilerArgs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
28 changes: 28 additions & 0 deletions
28
...on/project/src/test/java/com/yahoo/search/query/profile/QueryProfileCompilerTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. | ||
package com.yahoo.search.query.profile; | ||
|
||
import com.yahoo.config.subscription.ConfigGetter; | ||
import com.yahoo.search.query.profile.config.QueryProfileConfigurer; | ||
import com.yahoo.search.query.profile.config.QueryProfilesConfig; | ||
import org.junit.Test; | ||
|
||
import java.time.Instant; | ||
import java.time.temporal.ChronoUnit; | ||
|
||
/** | ||
* Compilation efficiency. | ||
* | ||
* @author jonmv | ||
*/ | ||
public class QueryProfileCompilerTestCase { | ||
|
||
@Test | ||
public void testCompilation() { | ||
QueryProfilesConfig config = new ConfigGetter<>(QueryProfilesConfig.class).getConfig("file:src/test/resources/query-profiles.cfg"); | ||
Instant start = Instant.now(); | ||
QueryProfileCompiler.compile(QueryProfileConfigurer.createFromConfig(config)); | ||
long compilationMillis = start.until(Instant.now(), ChronoUnit.MILLIS); | ||
System.out.println("Compilation time in seconds: " + compilationMillis / 1000.0); | ||
} | ||
|
||
} |
Oops, something went wrong.