Package org.apache.lucene.benchmark.byTask

Examples of org.apache.lucene.benchmark.byTask.PerfRunData


    props.setProperty("writer.version", TEST_VERSION_CURRENT.toString());
    props.setProperty("print.props", "false"); // don't print anything
    props.setProperty("directory", "RAMDirectory");
    props.setProperty(AddIndexesTask.ADDINDEXES_INPUT_DIR, inputDir.getAbsolutePath());
    Config config = new Config(props);
    return new PerfRunData(config);
  }
View Full Code Here


      r.close();
    }
  }
 
  public void testAddIndexesDefault() throws Exception {
    PerfRunData runData = createPerfRunData();
    // create the target index first
    new CreateIndexTask(runData).doLogic();
   
    AddIndexesTask task = new AddIndexesTask(runData);
    task.setup();
   
    // add the input index
    task.doLogic();
   
    // close the index
    new CloseIndexTask(runData).doLogic();
   
    assertIndex(runData);
   
    runData.close();
  }
View Full Code Here

   
    runData.close();
  }
 
  public void testAddIndexesDir() throws Exception {
    PerfRunData runData = createPerfRunData();
    // create the target index first
    new CreateIndexTask(runData).doLogic();
   
    AddIndexesTask task = new AddIndexesTask(runData);
    task.setup();
   
    // add the input index
    task.setParams("true");
    task.doLogic();
   
    // close the index
    new CloseIndexTask(runData).doLogic();
   
    assertIndex(runData);
   
    runData.close();
  }
View Full Code Here

   
    runData.close();
  }
 
  public void testAddIndexesReader() throws Exception {
    PerfRunData runData = createPerfRunData();
    // create the target index first
    new CreateIndexTask(runData).doLogic();
   
    AddIndexesTask task = new AddIndexesTask(runData);
    task.setup();
   
    // add the input index
    task.setParams("false");
    task.doLogic();
   
    // close the index
    new CloseIndexTask(runData).doLogic();
   
    assertIndex(runData);
   
    runData.close();
  }
View Full Code Here

    if (setTaskLogStep) {
      props.setProperty("log.step.MyPerf", Integer.toString(taskLogStepVal));
    }
    props.setProperty("directory", "RAMDirectory"); // no accidental FS dir.
    Config config = new Config(props);
    return new PerfRunData(config);
  }
View Full Code Here

    return new PerfRunData(config);
  }
 
  private void doLogStepTest(boolean setLogStep, int logStepVal,
      boolean setTaskLogStep, int taskLogStepVal, int expLogStepValue) throws Exception {
    PerfRunData runData = createPerfRunData(setLogStep, logStepVal, setTaskLogStep, taskLogStepVal);
    MyPerfTask mpt = new MyPerfTask(runData);
    assertEquals(expLogStepValue, mpt.getLogStep());
  }
View Full Code Here

    Properties props = new Properties();
    props.setProperty("doc.maker", docMakerName);
    props.setProperty("line.file.out", file.getAbsolutePath());
    props.setProperty("directory", "RAMDirectory"); // no accidental FS dir.
    Config config = new Config(props);
    return new PerfRunData(config);
  }
View Full Code Here

  public void testCategoryLines() throws Exception {
    // WriteLineDocTask replaced only \t characters w/ a space, since that's its
    // separator char. However, it didn't replace newline characters, which
    // resulted in errors in LineDocSource.
    File file = new File(getWorkDir(), "two-lines-each.txt");
    PerfRunData runData = createPerfRunData(file, WriteLineCategoryDocMaker.class.getName());
    WriteLineDocTask wldt = new WriteEnwikiLineDocTask(runData);
    for (int i=0; i<4; i++) { // four times so that each file should have 2 lines.
      wldt.doLogic();
    }
    wldt.close();
View Full Code Here

import java.util.Properties;

public class SearchWithSortTaskTest extends BenchmarkTestCase {

  public void testSetParams_docField() throws Exception {
    SearchWithSortTask task = new SearchWithSortTask(new PerfRunData(new Config(new Properties())));
    task.setParams("doc");
    assertEquals(SortField.Type.DOC, task.getSort().getSort()[0].getType());
  }
View Full Code Here

    props.setProperty("directory", "RAMDirectory");
    if (infoStreamValue != null) {
      props.setProperty("writer.info.stream", infoStreamValue);
    }
    Config config = new Config(props);
    return new PerfRunData(config);
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.benchmark.byTask.PerfRunData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.