lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o...@apache.org
Subject svn commit: r524969 [3/5] - in /lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark: ./ byTask/ byTask/feeds/ byTask/programmatic/ byTask/stats/ byTask/tasks/ byTask/utils/ standard/ stats/ utils/
Date Mon, 02 Apr 2007 23:37:17 GMT
Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java Mon Apr  2 16:37:14 2007
@@ -1,63 +1,63 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import java.io.IOException;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.utils.Config;
-
-
-/**
- * Open an index writer.
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import java.io.IOException;
+
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.utils.Config;
+
+
+/**
+ * Open an index writer.
  * <br>Other side effects: index writer object in perfRunData is set.
  * <br>Relevant properties: <code>merge.factor , max.buffered</code>.
- */
-public class OpenIndexTask extends PerfTask {
-
+ */
+public class OpenIndexTask extends PerfTask {
+
   public static final int DEFAULT_MAX_BUFFERED = 10;
   public static final int DEFAULT_MERGE_PFACTOR = 10;
 
-  public OpenIndexTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws IOException {
-    Directory dir = getRunData().getDirectory();
-    Analyzer analyzer = getRunData().getAnalyzer();
-    IndexWriter writer = new IndexWriter(dir, analyzer, false);
-    
-    Config config = getRunData().getConfig();
-    
-    boolean cmpnd = config.get("compound",true);
+  public OpenIndexTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws IOException {
+    Directory dir = getRunData().getDirectory();
+    Analyzer analyzer = getRunData().getAnalyzer();
+    IndexWriter writer = new IndexWriter(dir, analyzer, false);
+    
+    Config config = getRunData().getConfig();
+    
+    boolean cmpnd = config.get("compound",true);
     int mrgf = config.get("merge.factor",DEFAULT_MERGE_PFACTOR);
     int mxbf = config.get("max.buffered",DEFAULT_MAX_BUFFERED);
-
-    // must update params for newly opened writer
-    writer.setMaxBufferedDocs(mxbf);
-    writer.setMergeFactor(mrgf);
-    writer.setUseCompoundFile(cmpnd); // this one redundant?
-    
-    getRunData().setIndexWriter(writer);
-    return 1;
-  }
-
-}
+
+    // must update params for newly opened writer
+    writer.setMaxBufferedDocs(mxbf);
+    writer.setMergeFactor(mrgf);
+    writer.setUseCompoundFile(cmpnd); // this one redundant?
+    
+    getRunData().setIndexWriter(writer);
+    return 1;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenIndexTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenReaderTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenReaderTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenReaderTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenReaderTask.java Mon Apr  2 16:37:14 2007
@@ -1,43 +1,43 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import java.io.IOException;
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.store.Directory;
-
-/**
- * Open an index reader.
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import java.io.IOException;
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.store.Directory;
+
+/**
+ * Open an index reader.
  * <br>Other side effects: index redaer object in perfRunData is set.
- */
-public class OpenReaderTask extends PerfTask {
-
-  public OpenReaderTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws IOException {
-    Directory dir = getRunData().getDirectory();
-    IndexReader reader = IndexReader.open(dir);
-    getRunData().setIndexReader(reader);
-    return 1;
-  }
-
-}
+ */
+public class OpenReaderTask extends PerfTask {
+
+  public OpenReaderTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws IOException {
+    Directory dir = getRunData().getDirectory();
+    IndexReader reader = IndexReader.open(dir);
+    getRunData().setIndexReader(reader);
+    return 1;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OpenReaderTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OptimizeTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OptimizeTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OptimizeTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OptimizeTask.java Mon Apr  2 16:37:14 2007
@@ -1,40 +1,40 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.index.IndexWriter;
-
-/**
- * Optimize the index.
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.index.IndexWriter;
+
+/**
+ * Optimize the index.
  * <br>Other side effects: none.
- */
-public class OptimizeTask extends PerfTask {
-
-  public OptimizeTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
-    IndexWriter iw = getRunData().getIndexWriter();
-    iw.optimize();
-    //System.out.println("optimize called");
-    return 1;
-  }
-
-}
+ */
+public class OptimizeTask extends PerfTask {
+
+  public OptimizeTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
+    IndexWriter iw = getRunData().getIndexWriter();
+    iw.optimize();
+    //System.out.println("optimize called");
+    return 1;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/OptimizeTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java Mon Apr  2 16:37:14 2007
@@ -1,230 +1,230 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Points;
-import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-import org.apache.lucene.benchmark.byTask.utils.Format;
-
-/**
- * A (abstract)  task to be tested for performance.
- * <br>
- * Every performance task extends this class, and provides its own doLogic() method, 
- * which performss the actual task.
- * <br>
- * Tasks performing some work that should be measured for the task, can overide setup() and/or tearDown() and 
- * placed that work there. 
- * <br>
- * Relevant properties: <code>task.max.depth.log</code>.
- */
-public abstract class PerfTask implements Cloneable {
-
-  private PerfRunData runData;
-  
-  // propeties that all tasks have
-  private String name;
-  private int depth = 0;
-  private int maxDepthLogStart = 0;
-  protected String params = null;
-  
-  protected static final String NEW_LINE = System.getProperty("line.separator");
-
-  /**
-   * Should not be used externally
-   */
-  private PerfTask() {
-    name =  Format.simpleName(getClass());
-    if (name.endsWith("Task")) {
-      name = name.substring(0,name.length()-4);
-    }
-  }
-
-  public PerfTask(PerfRunData runData) {
-    this();
-    this.runData = runData;
-    this.maxDepthLogStart = runData.getConfig().get("task.max.depth.log",0);
-  }
-  
-  /* (non-Javadoc)
-   * @see java.lang.Object#clone()
-   */
-  protected Object clone() throws CloneNotSupportedException {
-    // tasks having non primitive data structures should overide this.
-    // otherwise parallel running of a task sequence might not run crrectly. 
-    return super.clone();
-  }
-
-  /**
-   * Run the task, record statistics.
-   * @return number of work items done by this task.
-   */
-  public final int runAndMaybeStats(boolean reportStats) throws Exception {
-    if (reportStats && depth <= maxDepthLogStart && !shouldNeverLogAtStart()) {
-      System.out.println("------------> starting task: " + getName());
-    }
-    if (shouldNotRecordStats() || !reportStats) {
-      setup();
-      int count = doLogic();
-      tearDown();
-      return count;
-    }
-    setup();
-    Points pnts = runData.getPoints();
-    TaskStats ts = pnts.markTaskStart(this,runData.getConfig().getRoundNumber());
-    int count = doLogic();
-    pnts.markTaskEnd(ts, count);
-    tearDown();
-    return count;
-  }
-
-  /**
-   * Perform the task once (ignoring repetions specification)
-   * Return number of work items done by this task.
-   * For indexing that can be number of docs added.
-   * For warming that can be number of scanned items, etc.
-   * @return number of work items done by this task.
-   */
-  public abstract int doLogic() throws Exception;
-  
-  /**
-   * @return Returns the name.
-   */
-  public String getName() {
-    if (params==null) {
-      return name;
-    } 
-    return new StringBuffer(name).append('(').append(params).append(')').toString();
-  }
-
-  /**
-   * @param name The name to set.
-   */
-  protected void setName(String name) {
-    this.name = name;
-  }
-
-  /**
-   * @return Returns the run data.
-   */
-  public PerfRunData getRunData() {
-    return runData;
-  }
-
-  /**
-   * @return Returns the depth.
-   */
-  public int getDepth() {
-    return depth;
-  }
-
-  /**
-   * @param depth The depth to set.
-   */
-  public void setDepth(int depth) {
-    this.depth = depth;
-  }
-  
-  // compute a blank string padding for printing this task indented by its depth  
-  String getPadding () {
-    char c[] = new char[4*getDepth()];
-    for (int i = 0; i < c.length; i++) c[i] = ' ';
-    return new String(c);
-  }
-  
-  /* (non-Javadoc)
-   * @see java.lang.Object#toString()
-   */
-  public String toString() {
-    String padd = getPadding();
-    StringBuffer sb = new StringBuffer(padd);
-    sb.append(getName());
-    return sb.toString();
-  }
-
-  /**
-   * @return Returns the maxDepthLogStart.
-   */
-  int getMaxDepthLogStart() {
-    return maxDepthLogStart;
-  }
-
-  /**
-   * Tasks that should never log at start can overide this.  
-   * @return true if this task should never log when it start.
-   */
-  protected boolean shouldNeverLogAtStart () {
-    return false;
-  }
-  
-  /**
-   * Tasks that should not record statistics can overide this.  
-   * @return true if this task should never record its statistics.
-   */
-  protected boolean shouldNotRecordStats () {
-    return false;
-  }
-
-  /**
-   * Task setup work that should not be measured for that specific task.
-   * By default it does nothing, but tasks can implement this, moving work from 
-   * doLogic() to this method. Only the work done in doLogicis measured for this task.
-   * Notice that higher level (sequence) tasks containing this task would then 
-   * measure larger time than the sum of their contained tasks.
-   * @throws Exception 
-   */
-  public void setup () throws Exception {
-  }
-  
-  /**
-   * Task tearDown work that should not be measured for that specific task.
-   * By default it does nothing, but tasks can implement this, moving work from 
-   * doLogic() to this method. Only the work done in doLogicis measured for this task.
-   * Notice that higher level (sequence) tasks containing this task would then 
-   * measure larger time than the sum of their contained tasks.
-   */
-  public void tearDown () throws Exception {
-  }
-
-  /**
-   * Sub classes that supports parameters must overide this method to return true.
-   * @return true iff this task supports command line params.
-   */
-  public boolean supportsParams () {
-    return false;
-  }
-  
-  /**
-   * Set the params of this task.
-   * @exception UnsupportedOperationException for tasks supporting command line parameters.
-   */
-  public void setParams(String params) {
-    if (!supportsParams()) {
-      throw new UnsupportedOperationException(getName()+" does not support command line parameters.");
-    }
-    this.params = params;
-  }
-  
-  /**
-   * @return Returns the Params.
-   */
-  public String getParams() {
-    return params;
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Points;
+import org.apache.lucene.benchmark.byTask.stats.TaskStats;
+import org.apache.lucene.benchmark.byTask.utils.Format;
+
+/**
+ * A (abstract)  task to be tested for performance.
+ * <br>
+ * Every performance task extends this class, and provides its own doLogic() method, 
+ * which performss the actual task.
+ * <br>
+ * Tasks performing some work that should be measured for the task, can overide setup() and/or tearDown() and 
+ * placed that work there. 
+ * <br>
+ * Relevant properties: <code>task.max.depth.log</code>.
+ */
+public abstract class PerfTask implements Cloneable {
+
+  private PerfRunData runData;
+  
+  // propeties that all tasks have
+  private String name;
+  private int depth = 0;
+  private int maxDepthLogStart = 0;
+  protected String params = null;
+  
+  protected static final String NEW_LINE = System.getProperty("line.separator");
+
+  /**
+   * Should not be used externally
+   */
+  private PerfTask() {
+    name =  Format.simpleName(getClass());
+    if (name.endsWith("Task")) {
+      name = name.substring(0,name.length()-4);
+    }
+  }
+
+  public PerfTask(PerfRunData runData) {
+    this();
+    this.runData = runData;
+    this.maxDepthLogStart = runData.getConfig().get("task.max.depth.log",0);
+  }
+  
+  /* (non-Javadoc)
+   * @see java.lang.Object#clone()
+   */
+  protected Object clone() throws CloneNotSupportedException {
+    // tasks having non primitive data structures should overide this.
+    // otherwise parallel running of a task sequence might not run crrectly. 
+    return super.clone();
+  }
+
+  /**
+   * Run the task, record statistics.
+   * @return number of work items done by this task.
+   */
+  public final int runAndMaybeStats(boolean reportStats) throws Exception {
+    if (reportStats && depth <= maxDepthLogStart && !shouldNeverLogAtStart()) {
+      System.out.println("------------> starting task: " + getName());
+    }
+    if (shouldNotRecordStats() || !reportStats) {
+      setup();
+      int count = doLogic();
+      tearDown();
+      return count;
+    }
+    setup();
+    Points pnts = runData.getPoints();
+    TaskStats ts = pnts.markTaskStart(this,runData.getConfig().getRoundNumber());
+    int count = doLogic();
+    pnts.markTaskEnd(ts, count);
+    tearDown();
+    return count;
+  }
+
+  /**
+   * Perform the task once (ignoring repetions specification)
+   * Return number of work items done by this task.
+   * For indexing that can be number of docs added.
+   * For warming that can be number of scanned items, etc.
+   * @return number of work items done by this task.
+   */
+  public abstract int doLogic() throws Exception;
+  
+  /**
+   * @return Returns the name.
+   */
+  public String getName() {
+    if (params==null) {
+      return name;
+    } 
+    return new StringBuffer(name).append('(').append(params).append(')').toString();
+  }
+
+  /**
+   * @param name The name to set.
+   */
+  protected void setName(String name) {
+    this.name = name;
+  }
+
+  /**
+   * @return Returns the run data.
+   */
+  public PerfRunData getRunData() {
+    return runData;
+  }
+
+  /**
+   * @return Returns the depth.
+   */
+  public int getDepth() {
+    return depth;
+  }
+
+  /**
+   * @param depth The depth to set.
+   */
+  public void setDepth(int depth) {
+    this.depth = depth;
+  }
+  
+  // compute a blank string padding for printing this task indented by its depth  
+  String getPadding () {
+    char c[] = new char[4*getDepth()];
+    for (int i = 0; i < c.length; i++) c[i] = ' ';
+    return new String(c);
+  }
+  
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  public String toString() {
+    String padd = getPadding();
+    StringBuffer sb = new StringBuffer(padd);
+    sb.append(getName());
+    return sb.toString();
+  }
+
+  /**
+   * @return Returns the maxDepthLogStart.
+   */
+  int getMaxDepthLogStart() {
+    return maxDepthLogStart;
+  }
+
+  /**
+   * Tasks that should never log at start can overide this.  
+   * @return true if this task should never log when it start.
+   */
+  protected boolean shouldNeverLogAtStart () {
+    return false;
+  }
+  
+  /**
+   * Tasks that should not record statistics can overide this.  
+   * @return true if this task should never record its statistics.
+   */
+  protected boolean shouldNotRecordStats () {
+    return false;
+  }
+
+  /**
+   * Task setup work that should not be measured for that specific task.
+   * By default it does nothing, but tasks can implement this, moving work from 
+   * doLogic() to this method. Only the work done in doLogicis measured for this task.
+   * Notice that higher level (sequence) tasks containing this task would then 
+   * measure larger time than the sum of their contained tasks.
+   * @throws Exception 
+   */
+  public void setup () throws Exception {
+  }
+  
+  /**
+   * Task tearDown work that should not be measured for that specific task.
+   * By default it does nothing, but tasks can implement this, moving work from 
+   * doLogic() to this method. Only the work done in doLogicis measured for this task.
+   * Notice that higher level (sequence) tasks containing this task would then 
+   * measure larger time than the sum of their contained tasks.
+   */
+  public void tearDown () throws Exception {
+  }
+
+  /**
+   * Sub classes that supports parameters must overide this method to return true.
+   * @return true iff this task supports command line params.
+   */
+  public boolean supportsParams () {
+    return false;
+  }
+  
+  /**
+   * Set the params of this task.
+   * @exception UnsupportedOperationException for tasks supporting command line parameters.
+   */
+  public void setParams(String params) {
+    if (!supportsParams()) {
+      throw new UnsupportedOperationException(getName()+" does not support command line parameters.");
+    }
+    this.params = params;
+  }
+  
+  /**
+   * @return Returns the Params.
+   */
+  public String getParams() {
+    return params;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/PerfTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java Mon Apr  2 16:37:14 2007
@@ -1,144 +1,144 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.feeds.QueryMaker;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.search.Hits;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.store.Directory;
-
-import java.io.IOException;
-
-
-/**
- * Read index (abstract) task.
- * Sub classes implement withSearch(), withWarm(), withTraverse() and withRetrieve()
- * methods to configure the actual action.
- * 
- * <p>Note: All ReadTasks reuse the reader if it is already open. 
- * Otherwise a reader is opened at start and closed at the end.
- *  
- * <p>Other side effects: none.
- */
-public abstract class ReadTask extends PerfTask {
-
-  public ReadTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
-    int res = 0;
-    boolean closeReader = false;
-    
-    // open reader or use existing one
-    IndexReader ir = getRunData().getIndexReader();
-    if (ir == null) {
-      Directory dir = getRunData().getDirectory();
-      ir = IndexReader.open(dir);
-      closeReader = true;
-      //res++; //this is confusing, comment it out
-    }
-    
-    // optionally warm and add num docs traversed to count
-    if (withWarm()) {
-      Document doc = null;
-      for (int m = 0; m < ir.maxDoc(); m++) {
-        if (!ir.isDeleted(m)) {
-          doc = ir.document(m);
-          res += (doc==null ? 0 : 1);
-        }
-      }
-    }
-    
-    if (withSearch()) {
-      res++;
-      IndexSearcher searcher = new IndexSearcher(ir);
-      QueryMaker queryMaker = getQueryMaker();
-      Query q = queryMaker.makeQuery();
-      Hits hits = searcher.search(q);
-      //System.out.println("searched: "+q);
-      
-      if (withTraverse() && hits!=null) {
-        int traversalSize = Math.min(hits.length(), traversalSize());
-        if (traversalSize > 0) {
-          boolean retrieve = withRetrieve();
-          for (int m = 0; m < hits.length(); m++) {
-            int id = hits.id(m);
-            res++;
-            if (retrieve) {
-              res += retrieveDoc(ir, id);
-            }
-          }
-        }
-      }
-      
-      searcher.close();
-    }
-    
-    if (closeReader) {
-      ir.close();
-    }
-    return res;
-  }
-
-  protected int retrieveDoc(IndexReader ir, int id) throws IOException {
-    return (ir.document(id) == null ? 0 : 1);
-  }
-
-  /**
-   * Return query maker used for this task.
-   */
-  public abstract QueryMaker getQueryMaker();
-
-  /**
-   * Return true if search should be performed.
-   */
-  public abstract boolean withSearch ();
-
-  /**
-   * Return true if warming should be performed.
-   */
-  public abstract boolean withWarm ();
-  
-  /**
-   * Return true if, with search, results should be traversed.
-   */
-  public abstract boolean withTraverse ();
-
-  /**
-   * Specify the number of hits to traverse.  Tasks should override this if they want to restrict the number
-   * of hits that are traversed when {@link #withTraverse()} is true. Must be greater than 0.
-   *
-   * Read task calculates the traversal as: Math.min(hits.length(), traversalSize())
-   * @return Integer.MAX_VALUE
-   */
-  public int traversalSize()
-  {
-    return Integer.MAX_VALUE;
-  }
-
-  /**
-   * Return true if, with search & results traversing, docs should be retrieved.
-   */
-  public abstract boolean withRetrieve ();
-
-}
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.feeds.QueryMaker;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.search.Hits;
+import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.store.Directory;
+
+import java.io.IOException;
+
+
+/**
+ * Read index (abstract) task.
+ * Sub classes implement withSearch(), withWarm(), withTraverse() and withRetrieve()
+ * methods to configure the actual action.
+ * 
+ * <p>Note: All ReadTasks reuse the reader if it is already open. 
+ * Otherwise a reader is opened at start and closed at the end.
+ *  
+ * <p>Other side effects: none.
+ */
+public abstract class ReadTask extends PerfTask {
+
+  public ReadTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
+    int res = 0;
+    boolean closeReader = false;
+    
+    // open reader or use existing one
+    IndexReader ir = getRunData().getIndexReader();
+    if (ir == null) {
+      Directory dir = getRunData().getDirectory();
+      ir = IndexReader.open(dir);
+      closeReader = true;
+      //res++; //this is confusing, comment it out
+    }
+    
+    // optionally warm and add num docs traversed to count
+    if (withWarm()) {
+      Document doc = null;
+      for (int m = 0; m < ir.maxDoc(); m++) {
+        if (!ir.isDeleted(m)) {
+          doc = ir.document(m);
+          res += (doc==null ? 0 : 1);
+        }
+      }
+    }
+    
+    if (withSearch()) {
+      res++;
+      IndexSearcher searcher = new IndexSearcher(ir);
+      QueryMaker queryMaker = getQueryMaker();
+      Query q = queryMaker.makeQuery();
+      Hits hits = searcher.search(q);
+      //System.out.println("searched: "+q);
+      
+      if (withTraverse() && hits!=null) {
+        int traversalSize = Math.min(hits.length(), traversalSize());
+        if (traversalSize > 0) {
+          boolean retrieve = withRetrieve();
+          for (int m = 0; m < hits.length(); m++) {
+            int id = hits.id(m);
+            res++;
+            if (retrieve) {
+              res += retrieveDoc(ir, id);
+            }
+          }
+        }
+      }
+      
+      searcher.close();
+    }
+    
+    if (closeReader) {
+      ir.close();
+    }
+    return res;
+  }
+
+  protected int retrieveDoc(IndexReader ir, int id) throws IOException {
+    return (ir.document(id) == null ? 0 : 1);
+  }
+
+  /**
+   * Return query maker used for this task.
+   */
+  public abstract QueryMaker getQueryMaker();
+
+  /**
+   * Return true if search should be performed.
+   */
+  public abstract boolean withSearch ();
+
+  /**
+   * Return true if warming should be performed.
+   */
+  public abstract boolean withWarm ();
+  
+  /**
+   * Return true if, with search, results should be traversed.
+   */
+  public abstract boolean withTraverse ();
+
+  /**
+   * Specify the number of hits to traverse.  Tasks should override this if they want to restrict the number
+   * of hits that are traversed when {@link #withTraverse()} is true. Must be greater than 0.
+   *
+   * Read task calculates the traversal as: Math.min(hits.length(), traversalSize())
+   * @return Integer.MAX_VALUE
+   */
+  public int traversalSize()
+  {
+    return Integer.MAX_VALUE;
+  }
+
+  /**
+   * Return true if, with search & results traversing, docs should be retrieved.
+   */
+  public abstract boolean withRetrieve ();
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepAllTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepAllTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepAllTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepAllTask.java Mon Apr  2 16:37:14 2007
@@ -1,48 +1,48 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Report;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Report;
 import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-
-/**
- * Report all statistics with no aggregations.
+
+/**
+ * Report all statistics with no aggregations.
  * <br>Other side effects: None.
- */
-public class RepAllTask extends ReportTask {
-
-  public RepAllTask(PerfRunData runData) {
-    super(runData);
-   }
-
-  public int doLogic() throws Exception {
+ */
+public class RepAllTask extends ReportTask {
+
+  public RepAllTask(PerfRunData runData) {
+    super(runData);
+   }
+
+  public int doLogic() throws Exception {
     Report rp = reportAll(getRunData().getPoints().taskStats());
-    
-    System.out.println();
-    System.out.println("------------> Report All ("+rp.getSize()+" out of "+rp.getOutOf()+")");
-    System.out.println(rp.getText());
-    System.out.println();
-    return 0;
-  }
+    
+    System.out.println();
+    System.out.println("------------> Report All ("+rp.getSize()+" out of "+rp.getOutOf()+")");
+    System.out.println(rp.getText());
+    System.out.println();
+    return 0;
+  }
   
   /**
    * Report detailed statistics as a string
@@ -74,5 +74,5 @@
     String reptxt = (reported==0 ? "No Matching Entries Were Found!" : sb.toString());
     return new Report(reptxt,reported,reported,taskStats.size());
   }
-
-}
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepAllTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSelectByPrefTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSelectByPrefTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSelectByPrefTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSelectByPrefTask.java Mon Apr  2 16:37:14 2007
@@ -1,50 +1,50 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Report;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Report;
 import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-
-/**
- * Report by-name-prefix statistics with no aggregations.
+
+/**
+ * Report by-name-prefix statistics with no aggregations.
  * <br>Other side effects: None.
- */
-public class RepSelectByPrefTask extends RepSumByPrefTask {
-
-  public RepSelectByPrefTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
+ */
+public class RepSelectByPrefTask extends RepSumByPrefTask {
+
+  public RepSelectByPrefTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
     Report rp = reportSelectByPrefix(getRunData().getPoints().taskStats());
-    
-    System.out.println();
-    System.out.println("------------> Report Select By Prefix ("+prefix+") ("+
-        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
-    System.out.println(rp.getText());
-    System.out.println();
-
-    return 0;
-  }
+    
+    System.out.println();
+    System.out.println("------------> Report Select By Prefix ("+prefix+") ("+
+        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
+    System.out.println(rp.getText());
+    System.out.println();
+
+    return 0;
+  }
   
   protected Report reportSelectByPrefix(List taskStats) {
     String longestOp = longestOp(taskStats.iterator());
@@ -72,4 +72,4 @@
     return new Report(reptxt,reported,reported, taskStats.size());
   }
 
-}
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSelectByPrefTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java Mon Apr  2 16:37:14 2007
@@ -1,52 +1,52 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Report;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Report;
 import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-
-/**
- * Report all statistics grouped/aggregated by name and round.
+
+/**
+ * Report all statistics grouped/aggregated by name and round.
  * <br>Other side effects: None.
- */
-public class RepSumByNameRoundTask extends ReportTask {
-
-  public RepSumByNameRoundTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
+ */
+public class RepSumByNameRoundTask extends ReportTask {
+
+  public RepSumByNameRoundTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
     Report rp = reportSumByNameRound(getRunData().getPoints().taskStats());
-
-    System.out.println();
-    System.out.println("------------> Report Sum By (any) Name and Round ("+
-        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
-    System.out.println(rp.getText());
-    System.out.println();
-    
-    return 0;
-  }
-
+
+    System.out.println();
+    System.out.println("------------> Report Sum By (any) Name and Round ("+
+        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
+    System.out.println(rp.getText());
+    System.out.println();
+    
+    return 0;
+  }
+
   /**
    * Report statistics as a string, aggregate for tasks named the same, and from the same round.
    * @return the report
@@ -78,4 +78,4 @@
     return genPartialReport(reported, p2, taskStats.size());
   }
 
-}
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java Mon Apr  2 16:37:14 2007
@@ -1,52 +1,52 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Report;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Report;
 import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-
-/**
- * Report all statistics aggregated by name.
+
+/**
+ * Report all statistics aggregated by name.
  * <br>Other side effects: None.
- */
-public class RepSumByNameTask extends ReportTask {
-
-  public RepSumByNameTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
+ */
+public class RepSumByNameTask extends ReportTask {
+
+  public RepSumByNameTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
     Report rp = reportSumByName(getRunData().getPoints().taskStats());
-
-    System.out.println();
-    System.out.println("------------> Report Sum By (any) Name ("+
-        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
-    System.out.println(rp.getText());
-    System.out.println();
-
-    return 0;
-  }
-
+
+    System.out.println();
+    System.out.println("------------> Report Sum By (any) Name ("+
+        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
+    System.out.println(rp.getText());
+    System.out.println();
+
+    return 0;
+  }
+
   /**
    * Report statistics as a string, aggregate for tasks named the same.
    * @return the report
@@ -78,4 +78,4 @@
   }
 
 
-}
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java Mon Apr  2 16:37:14 2007
@@ -1,52 +1,52 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Report;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Report;
 import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-
-/**
- * Report all prefix matching statistics grouped/aggregated by name and round.
+
+/**
+ * Report all prefix matching statistics grouped/aggregated by name and round.
  * <br>Other side effects: None.
- */
-public class RepSumByPrefRoundTask extends RepSumByPrefTask {
-
-  public RepSumByPrefRoundTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
+ */
+public class RepSumByPrefRoundTask extends RepSumByPrefTask {
+
+  public RepSumByPrefRoundTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
     Report rp = reportSumByPrefixRound(getRunData().getPoints().taskStats());
-    
-    System.out.println();
-    System.out.println("------------> Report sum by Prefix ("+prefix+") and Round ("+
-        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
-    System.out.println(rp.getText());
-    System.out.println();
-
-    return 0;
-  }
-
+    
+    System.out.println();
+    System.out.println("------------> Report sum by Prefix ("+prefix+") and Round ("+
+        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
+    System.out.println(rp.getText());
+    System.out.println();
+
+    return 0;
+  }
+
   protected Report reportSumByPrefixRound(List taskStats) {
     // aggregate by task name and by round
     int reported = 0;
@@ -75,4 +75,4 @@
   }
 
 
-}
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java Mon Apr  2 16:37:14 2007
@@ -1,90 +1,90 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.stats.Report;
-import org.apache.lucene.benchmark.byTask.stats.TaskStats;
-
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-
-/**
- * Report by-name-prefix statistics aggregated by name.
- * <br>Other side effects: None.
- */
-public class RepSumByPrefTask extends ReportTask {
-
-  public RepSumByPrefTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  protected String prefix;
-
-  public int doLogic() throws Exception {
-    Report rp = reportSumByPrefix(getRunData().getPoints().taskStats());
-    
-    System.out.println();
-    System.out.println("------------> Report Sum By Prefix ("+prefix+") ("+
-        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
-    System.out.println(rp.getText());
-    System.out.println();
-
-    return 0;
-  }
-
-  protected Report reportSumByPrefix (List taskStats) {
-    // aggregate by task name
-    int reported = 0;
-    LinkedHashMap p2 = new LinkedHashMap();
-    for (Iterator it = taskStats.iterator(); it.hasNext();) {
-      TaskStats stat1 = (TaskStats) it.next();
-      if (stat1.getElapsed()>=0 && stat1.getTask().getName().startsWith(prefix)) { // only ended tasks with proper name
-        reported++;
-        String name = stat1.getTask().getName();
-        TaskStats stat2 = (TaskStats) p2.get(name);
-        if (stat2 == null) {
-          try {
-            stat2 = (TaskStats) stat1.clone();
-          } catch (CloneNotSupportedException e) {
-            throw new RuntimeException(e);
-          }
-          p2.put(name,stat2);
-        } else {
-          stat2.add(stat1);
-        }
-      }
-    }
-    // now generate report from secondary list p2    
-    return genPartialReport(reported, p2, taskStats.size());
-  }
-  
-
-  public void setPrefix(String prefix) {
-    this.prefix = prefix;
-  }
-
-  /* (non-Javadoc)
-   * @see PerfTask#toString()
-   */
-  public String toString() {
-    return super.toString()+" "+prefix;
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.stats.Report;
+import org.apache.lucene.benchmark.byTask.stats.TaskStats;
+
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+/**
+ * Report by-name-prefix statistics aggregated by name.
+ * <br>Other side effects: None.
+ */
+public class RepSumByPrefTask extends ReportTask {
+
+  public RepSumByPrefTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  protected String prefix;
+
+  public int doLogic() throws Exception {
+    Report rp = reportSumByPrefix(getRunData().getPoints().taskStats());
+    
+    System.out.println();
+    System.out.println("------------> Report Sum By Prefix ("+prefix+") ("+
+        rp.getSize()+" about "+rp.getReported()+" out of "+rp.getOutOf()+")");
+    System.out.println(rp.getText());
+    System.out.println();
+
+    return 0;
+  }
+
+  protected Report reportSumByPrefix (List taskStats) {
+    // aggregate by task name
+    int reported = 0;
+    LinkedHashMap p2 = new LinkedHashMap();
+    for (Iterator it = taskStats.iterator(); it.hasNext();) {
+      TaskStats stat1 = (TaskStats) it.next();
+      if (stat1.getElapsed()>=0 && stat1.getTask().getName().startsWith(prefix)) { // only ended tasks with proper name
+        reported++;
+        String name = stat1.getTask().getName();
+        TaskStats stat2 = (TaskStats) p2.get(name);
+        if (stat2 == null) {
+          try {
+            stat2 = (TaskStats) stat1.clone();
+          } catch (CloneNotSupportedException e) {
+            throw new RuntimeException(e);
+          }
+          p2.put(name,stat2);
+        } else {
+          stat2.add(stat1);
+        }
+      }
+    }
+    // now generate report from secondary list p2    
+    return genPartialReport(reported, p2, taskStats.size());
+  }
+  
+
+  public void setPrefix(String prefix) {
+    this.prefix = prefix;
+  }
+
+  /* (non-Javadoc)
+   * @see PerfTask#toString()
+   */
+  public String toString() {
+    return super.toString()+" "+prefix;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReportTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReportTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReportTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReportTask.java Mon Apr  2 16:37:14 2007
@@ -1,52 +1,52 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
+package org.apache.lucene.benchmark.byTask.tasks;
+
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 
-import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.stats.Report;
 import org.apache.lucene.benchmark.byTask.stats.TaskStats;
 import org.apache.lucene.benchmark.byTask.utils.Format;
-
-/**
- * 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.
- */
-
-/**
- * Report (abstract) task - all report tasks extend this task.
- */
-public abstract class ReportTask extends PerfTask {
-
-  public ReportTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  /* (non-Javadoc)
-   * @see PerfTask#shouldNeverLogAtStart()
-   */
-  protected boolean shouldNeverLogAtStart() {
-    return true;
-  }
-
-  /* (non-Javadoc)
-   * @see PerfTask#shouldNotRecordStats()
-   */
-  protected boolean shouldNotRecordStats() {
-    return true;
-  }
+
+/**
+ * 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.
+ */
+
+/**
+ * Report (abstract) task - all report tasks extend this task.
+ */
+public abstract class ReportTask extends PerfTask {
+
+  public ReportTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  /* (non-Javadoc)
+   * @see PerfTask#shouldNeverLogAtStart()
+   */
+  protected boolean shouldNeverLogAtStart() {
+    return true;
+  }
+
+  /* (non-Javadoc)
+   * @see PerfTask#shouldNotRecordStats()
+   */
+  protected boolean shouldNotRecordStats() {
+    return true;
+  }
 
   /*
    * From here start the code used to generate the reports. 
@@ -159,4 +159,4 @@
 
 
 
-}
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReportTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetInputsTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetInputsTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetInputsTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetInputsTask.java Mon Apr  2 16:37:14 2007
@@ -1,48 +1,48 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-
-/**
- * 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.
- */
-
-
-
-/**
- * Reset inputs so that the test run would behave, input wise, 
- * as if it just started. This affects e.g. the generation of docs and queries.
- */
-public class ResetInputsTask extends PerfTask {
-
-  public ResetInputsTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
-    getRunData().resetInputs();
-    return 0;
-  }
-  
-  /*
-   * (non-Javadoc)
-   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#shouldNotRecordStats()
-   */
-  protected boolean shouldNotRecordStats() {
-    return true;
-  }
-
-
-}
+package org.apache.lucene.benchmark.byTask.tasks;
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+
+/**
+ * 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.
+ */
+
+
+
+/**
+ * Reset inputs so that the test run would behave, input wise, 
+ * as if it just started. This affects e.g. the generation of docs and queries.
+ */
+public class ResetInputsTask extends PerfTask {
+
+  public ResetInputsTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
+    getRunData().resetInputs();
+    return 0;
+  }
+  
+  /*
+   * (non-Javadoc)
+   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#shouldNotRecordStats()
+   */
+  protected boolean shouldNotRecordStats() {
+    return true;
+  }
+
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetInputsTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemEraseTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemEraseTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemEraseTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemEraseTask.java Mon Apr  2 16:37:14 2007
@@ -1,50 +1,50 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-
-/**
- * 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.
- */
-
-
-
-/**
- * Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
+package org.apache.lucene.benchmark.byTask.tasks;
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+
+/**
+ * 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.
+ */
+
+
+
+/**
+ * Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
  * <br>This contains ResetInputs.
  * <br>Other side effects: writers/readers nulified, deleted, closed.
- * Index is erased.
- * Directory is erased.
- */
-public class ResetSystemEraseTask extends PerfTask {
-
-  public ResetSystemEraseTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
-    getRunData().reinit(true);
-    return 0;
-  }
-  
-  /*
-   * (non-Javadoc)
-   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#shouldNotRecordStats()
-   */
-  protected boolean shouldNotRecordStats() {
-    return true;
-  }
-
-}
+ * Index is erased.
+ * Directory is erased.
+ */
+public class ResetSystemEraseTask extends PerfTask {
+
+  public ResetSystemEraseTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
+    getRunData().reinit(true);
+    return 0;
+  }
+  
+  /*
+   * (non-Javadoc)
+   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#shouldNotRecordStats()
+   */
+  protected boolean shouldNotRecordStats() {
+    return true;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemEraseTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemSoftTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemSoftTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemSoftTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemSoftTask.java Mon Apr  2 16:37:14 2007
@@ -1,50 +1,50 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-
-/**
- * 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.
- */
-
-
-
-/**
- * Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.
- * This contains ResetInputs.
+package org.apache.lucene.benchmark.byTask.tasks;
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+
+/**
+ * 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.
+ */
+
+
+
+/**
+ * Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.
+ * This contains ResetInputs.
  * <br>Other side effects: writers/readers nulified, closed.
- * Index is NOT erased.
- * Directory is NOT erased.
- */
-public class ResetSystemSoftTask extends PerfTask {
-
-  public ResetSystemSoftTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public int doLogic() throws Exception {
-    getRunData().reinit(false);
-    return 0;
-  }
-
-  /*
-   * (non-Javadoc)
-   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#shouldNotRecordStats()
-   */
-  protected boolean shouldNotRecordStats() {
-    return true;
-  }
-
-}
+ * Index is NOT erased.
+ * Directory is NOT erased.
+ */
+public class ResetSystemSoftTask extends PerfTask {
+
+  public ResetSystemSoftTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public int doLogic() throws Exception {
+    getRunData().reinit(false);
+    return 0;
+  }
+
+  /*
+   * (non-Javadoc)
+   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#shouldNotRecordStats()
+   */
+  protected boolean shouldNotRecordStats() {
+    return true;
+  }
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ResetSystemSoftTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTask.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTask.java?view=diff&rev=524969&r1=524968&r2=524969
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTask.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTask.java Mon Apr  2 16:37:14 2007
@@ -1,56 +1,56 @@
-package org.apache.lucene.benchmark.byTask.tasks;
-
-/**
- * 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.
- */
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.feeds.QueryMaker;
-
-/**
- * Search task.
- * 
- * <p>Note: This task reuses the reader if it is already open. 
- * Otherwise a reader is opened at start and closed at the end.
- */
-public class SearchTask extends ReadTask {
-
-  public SearchTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  public boolean withRetrieve() {
-    return false;
-  }
-
-  public boolean withSearch() {
-    return true;
-  }
-
-  public boolean withTraverse() {
-    return false;
-  }
-
-  public boolean withWarm() {
-    return false;
-  }
-
-  public QueryMaker getQueryMaker() {
+package org.apache.lucene.benchmark.byTask.tasks;
+
+/**
+ * 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.
+ */
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.feeds.QueryMaker;
+
+/**
+ * Search task.
+ * 
+ * <p>Note: This task reuses the reader if it is already open. 
+ * Otherwise a reader is opened at start and closed at the end.
+ */
+public class SearchTask extends ReadTask {
+
+  public SearchTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  public boolean withRetrieve() {
+    return false;
+  }
+
+  public boolean withSearch() {
+    return true;
+  }
+
+  public boolean withTraverse() {
+    return false;
+  }
+
+  public boolean withWarm() {
+    return false;
+  }
+
+  public QueryMaker getQueryMaker() {
     return getRunData().getQueryMaker(this);
-  }
-
-
-}
+  }
+
+
+}

Propchange: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchTask.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message