You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by gs...@apache.org on 2007/10/11 14:10:31 UTC

svn commit: r583792 - in /lucene/java/trunk/contrib/benchmark: conf/ src/java/org/apache/lucene/benchmark/byTask/utils/

Author: gsingers
Date: Thu Oct 11 05:10:31 2007
New Revision: 583792

URL: http://svn.apache.org/viewvc?rev=583792&view=rev
Log:
LUCENE-1027:  Added better formatting of doubles, added wikipedia-flush-by-RAM for comparison

Added:
    lucene/java/trunk/contrib/benchmark/conf/wikipedia-flush-by-RAM.alg
Modified:
    lucene/java/trunk/contrib/benchmark/conf/micro-standard-flush-by-ram.alg
    lucene/java/trunk/contrib/benchmark/conf/standard-flush-by-RAM.alg
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Format.java

Modified: lucene/java/trunk/contrib/benchmark/conf/micro-standard-flush-by-ram.alg
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/conf/micro-standard-flush-by-ram.alg?rev=583792&r1=583791&r2=583792&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/conf/micro-standard-flush-by-ram.alg (original)
+++ lucene/java/trunk/contrib/benchmark/conf/micro-standard-flush-by-ram.alg Thu Oct 11 05:10:31 2007
@@ -19,7 +19,7 @@
 
 #merge.factor=mrg:10:100:10:100
 #max.buffered=buf:10:10:100:100
-ram.flush.mb=ram:32:40:48:56
+ram.flush.mb=flush:32:40:48:56
 compound=true
 
 analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer

Modified: lucene/java/trunk/contrib/benchmark/conf/standard-flush-by-RAM.alg
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/conf/standard-flush-by-RAM.alg?rev=583792&r1=583791&r2=583792&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/conf/standard-flush-by-RAM.alg (original)
+++ lucene/java/trunk/contrib/benchmark/conf/standard-flush-by-RAM.alg Thu Oct 11 05:10:31 2007
@@ -19,7 +19,7 @@
 
 #merge.factor=mrg:10:100:10:100:10:100:10:100
 #max.buffered=buf:10:10:100:100:10:10:100:100
-ram.flush.mb=ram:32:40:48:56:32:40:48:56
+ram.flush.mb=flush:32:40:48:56:32:40:48:56
 compound=cmpnd:true:true:true:true:false:false:false:false
 
 analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer

Added: lucene/java/trunk/contrib/benchmark/conf/wikipedia-flush-by-RAM.alg
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/conf/wikipedia-flush-by-RAM.alg?rev=583792&view=auto
==============================================================================
--- lucene/java/trunk/contrib/benchmark/conf/wikipedia-flush-by-RAM.alg (added)
+++ lucene/java/trunk/contrib/benchmark/conf/wikipedia-flush-by-RAM.alg Thu Oct 11 05:10:31 2007
@@ -0,0 +1,69 @@
+#/**
+# * 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.
+# */
+# -------------------------------------------------------------------------------------
+# multi val params are iterated by NewRound's, added to reports, start with column name.
+#
+# based on micro-standard
+#
+# modified to use wikipedia sources and index entire docs
+# currently just used to measure ingest rate
+
+#merge.factor=mrg:10:100:10:100
+#max.buffered=buf:10:10:100:100
+ram.flush.mb=ram:32:40:48:56
+
+max.field.length=2147483647
+
+
+compound=true
+
+analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
+directory=FSDirectory
+
+doc.stored=true
+doc.tokenized=true
+doc.term.vector=false
+doc.add.log.step=500
+
+docs.dir=enwiki
+
+doc.maker=org.apache.lucene.benchmark.byTask.feeds.DirDocMaker
+
+query.maker=org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker
+
+# task at this depth or less would print when they start
+task.max.depth.log=2
+
+log.queries=false
+# -------------------------------------------------------------------------------------
+
+{ "Rounds"
+
+    ResetSystemErase
+
+    { "Populate"
+        CreateIndex
+        { "MAddDocs" AddDoc > : 200000
+        CloseIndex
+    }
+
+    NewRound
+
+} : 8
+
+RepSumByName
+RepSumByPrefRound MAddDocs

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java?rev=583792&r1=583791&r2=583792&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java Thu Oct 11 05:10:31 2007
@@ -376,7 +376,7 @@
         else if (a instanceof double[]) {
           double ad[] = (double[]) a;
           int n = roundNum % ad.length;
-          sb.append(Format.format(2, (float) ad[n],template));
+          sb.append(Format.format(2, ad[n],template));
         }
         else {
           boolean ab[] = (boolean[]) a;

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Format.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Format.java?rev=583792&r1=583791&r2=583792&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Format.java (original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Format.java Thu Oct 11 05:10:31 2007
@@ -52,6 +52,11 @@
     return res.substring(res.length() - col.length());
   }
 
+  public static String format(int numFracDigits, double f, String col) {
+    String res = padd + numFormat[numFracDigits].format(f);
+    return res.substring(res.length() - col.length());
+  }
+
   /**
    * Padd a number from right.
    * @param numFracDigits number of digits in fraction part - must be 0 or 1 or 2.
@@ -60,6 +65,11 @@
    * @return formatted string.
    */
   public static String formatPaddRight(int numFracDigits, float f, String col) {
+    String res = numFormat[numFracDigits].format(f) + padd;
+    return res.substring(0, col.length());
+  }
+
+  public static String formatPaddRight(int numFracDigits, double f, String col) {
     String res = numFormat[numFracDigits].format(f) + padd;
     return res.substring(0, col.length());
   }