mirror of https://github.com/apache/lucene.git
change some 'performance' tests so that they use a Logger instead of System.out -- removes some spurrious output from the automated tests (people looking ofr hte perf ouptut can set their logger properties accordingly)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@945925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ff39e8da3
commit
c5ae13f39e
|
@ -25,11 +25,18 @@ import org.apache.solr.client.solrj.ResponseParser;
|
|||
import org.apache.solr.client.solrj.impl.BinaryResponseParser;
|
||||
import org.apache.solr.client.solrj.impl.XMLResponseParser;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.io.*;
|
||||
|
||||
|
||||
public class TestWriterPerf extends AbstractSolrTestCase {
|
||||
|
||||
public static final Logger log
|
||||
= LoggerFactory.getLogger(TestWriterPerf.class);
|
||||
|
||||
public String getSchemaFile() { return "schema11.xml"; }
|
||||
public String getSolrConfigFile() { return "solrconfig-functionquery.xml"; }
|
||||
public String getCoreName() { return "basic"; }
|
||||
|
@ -131,7 +138,7 @@ public class TestWriterPerf extends AbstractSolrTestCase {
|
|||
|
||||
long decodeTime = Math.max(System.currentTimeMillis() - start, 1);
|
||||
|
||||
System.out.println("writer "+writerName+", size="+out.size()+", encodeRate="+(encodeTime==1 ? "N/A": ""+(encIter*1000L/encodeTime)) + ", decodeRate="+(decodeTime==1 ? "N/A": ""+(decIter*1000L/decodeTime)) );
|
||||
log.info("writer "+writerName+", size="+out.size()+", encodeRate="+(encodeTime==1 ? "N/A": ""+(encIter*1000L/encodeTime)) + ", decodeRate="+(decodeTime==1 ? "N/A": ""+(decIter*1000L/decodeTime)) );
|
||||
|
||||
req.close();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,9 @@ import org.apache.solr.schema.IndexSchema;
|
|||
import org.apache.solr.util.AbstractSolrTestCase;
|
||||
import org.apache.solr.common.util.StrUtils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -34,6 +37,9 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class TestIndexingPerformance extends AbstractSolrTestCase {
|
||||
|
||||
public static final Logger log
|
||||
= LoggerFactory.getLogger(TestIndexingPerformance.class);
|
||||
|
||||
public String getSchemaFile() { return "schema12.xml"; }
|
||||
public String getSolrConfigFile() { return "solrconfig_perf.xml"; }
|
||||
|
||||
|
@ -104,8 +110,8 @@ public class TestIndexingPerformance extends AbstractSolrTestCase {
|
|||
updateHandler.addDoc(add);
|
||||
}
|
||||
long end = System.currentTimeMillis();
|
||||
System.out.println("includeDoc="+includeDoc+" doc="+ Arrays.toString(fields));
|
||||
System.out.println("iter="+iter +" time=" + (end-start) + " throughput=" + ((long)iter*1000)/(end-start));
|
||||
log.info("includeDoc="+includeDoc+" doc="+ Arrays.toString(fields));
|
||||
log.info("iter="+iter +" time=" + (end-start) + " throughput=" + ((long)iter*1000)/(end-start));
|
||||
|
||||
//discard all the changes
|
||||
updateHandler.rollback(new RollbackUpdateCommand());
|
||||
|
@ -113,4 +119,4 @@ public class TestIndexingPerformance extends AbstractSolrTestCase {
|
|||
req.close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue