blob: 97f17bd3cfbce93d989c6e7d3971c3c1f3ecce6f [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id "java"
}
description = 'Lucene benchmarking module'
dependencies {
moduleImplementation project(':lucene:core')
moduleImplementation project(':lucene:analysis:common')
moduleImplementation project(':lucene:facet')
moduleImplementation project(':lucene:highlighter')
moduleImplementation project(':lucene:queries')
moduleImplementation project(':lucene:spatial-extras')
moduleImplementation project(':lucene:queryparser')
moduleImplementation "org.apache.commons:commons-compress"
moduleImplementation "com.ibm.icu:icu4j"
moduleImplementation "org.locationtech.spatial4j:spatial4j"
moduleImplementation ("net.sourceforge.nekohtml:nekohtml", {
exclude module: "xml-apis"
// LUCENE-10337: Exclude xercesImpl from module path because it has split packages with the JDK (!)
exclude module: "xercesImpl"
})
// LUCENE-10337: Include xercesImpl on regular classpath where it won't cause conflicts.
implementation ("xerces:xercesImpl", {
exclude module: "xml-apis"
})
moduleRuntimeOnly project(':lucene:analysis:icu')
moduleTestImplementation project(':lucene:test-framework')
}
// We add 'conf' to resources because we validate *.alg script correctness in one of the tests.
sourceSets {
test.resources.srcDirs += ['conf']
}
task run(type: JavaExec) {
description "Run a perf test (optional: -PtaskAlg=conf/your-algorithm-file -PmaxHeapSize=1G). Before running this, you need to download the dataset the benchmark run against (e.g., by getReuters task). See dataset download tasks for more details."
group "Utility launchers"
mainClass = 'org.apache.lucene.benchmark.byTask.Benchmark'
classpath sourceSets.main.runtimeClasspath
// allow these to be specified on the CLI via -PtaskAlg= for example
args = [propertyOrDefault('taskAlg', 'conf/micro-standard.alg')]
maxHeapSize = propertyOrDefault('maxHeapSize', '1G')
String stdOutStr = propertyOrDefault('standardOutput', null)
if (stdOutStr != null) {
standardOutput = new File(stdOutStr).newOutputStream()
}
debugOptions {
enabled = false
port = 5005
suspend = true
}
}