Skip to content

Commit

Permalink
Merge pull request #4271 from vespa-engine/hmusum/move-test-3
Browse files Browse the repository at this point in the history
Move test from internal repo
  • Loading branch information
hmusum authored Nov 14, 2024
2 parents cfbb746 + 82ea722 commit bff0e69
Show file tree
Hide file tree
Showing 5 changed files with 27,181 additions and 0 deletions.
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>
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);
}

}
Loading

0 comments on commit bff0e69

Please sign in to comment.