mirror of https://github.com/apache/lucene.git
LUCENE-6399: Benchmark's QueryMaker.resetInputs should call setConfig
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1672742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
489f56def8
commit
09ddb7d912
|
@ -92,6 +92,9 @@ Other
|
|||
when resolving deleted terms to matched docids. (Robert Muir, Adrien
|
||||
Grand, Mike McCandless)
|
||||
|
||||
* LUCENE-6399: Benchmark module's QueryMaker.resetInputs should call setConfig
|
||||
so queries can react to property changes in new rounds. (David Smiley)
|
||||
|
||||
======================= Lucene 5.1.0 =======================
|
||||
|
||||
New Features
|
||||
|
|
|
@ -421,7 +421,13 @@ public class PerfRunData implements Closeable {
|
|||
docMaker.resetInputs();
|
||||
facetSource.resetInputs();
|
||||
for (final QueryMaker queryMaker : readTaskQueryMaker.values()) {
|
||||
queryMaker.resetInputs();
|
||||
try {
|
||||
queryMaker.resetInputs();
|
||||
} catch (IOException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ package org.apache.lucene.benchmark.byTask.feeds;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.benchmark.byTask.utils.Config;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
||||
/**
|
||||
* Abstract base query maker.
|
||||
|
@ -29,8 +29,10 @@ public abstract class AbstractQueryMaker implements QueryMaker {
|
|||
protected Config config;
|
||||
|
||||
@Override
|
||||
public void resetInputs() {
|
||||
public void resetInputs() throws Exception {
|
||||
qnum = 0;
|
||||
// re-initialize since properties by round may have changed.
|
||||
setConfig(config);
|
||||
}
|
||||
|
||||
protected abstract Query[] prepareQueries() throws Exception;
|
||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.lucene.benchmark.byTask.feeds;
|
|||
*/
|
||||
|
||||
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.benchmark.byTask.utils.Config;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ public interface QueryMaker {
|
|||
public void setConfig (Config config) throws Exception;
|
||||
|
||||
/** Reset inputs so that the test run would behave, input wise, as if it just started. */
|
||||
public void resetInputs();
|
||||
public void resetInputs() throws Exception;
|
||||
|
||||
/** Print the queries */
|
||||
public String printQueries();
|
||||
|
|
Loading…
Reference in New Issue