You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2020/12/14 08:03:48 UTC

[lucene-solr] branch master updated: use RTimer

This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 63943a7  use RTimer
63943a7 is described below

commit 63943a739b8373cd0d117e8687d8a3ba20580e1a
Author: noblepaul <no...@gmail.com>
AuthorDate: Mon Dec 14 19:03:31 2020 +1100

    use RTimer
---
 solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java b/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java
index d4e68e6..d7a11c2 100644
--- a/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java
+++ b/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java
@@ -19,6 +19,7 @@ package org.apache.solr.schema;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.util.CommandOperation;
 import org.apache.solr.core.SolrConfig;
+import org.apache.solr.util.RTimer;
 import org.apache.solr.util.TestHarness;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -80,10 +81,10 @@ public class TestSchemaManager extends SolrTestCaseJ4 {
   public void testSchemaLoadingPerf() {
     SolrConfig config = TestHarness.createConfig(testSolrHome, "collection1", "solrconfig.xml");
     List<String> names = Arrays.asList("schema.xml", "schema11.xml", "schema12.xml", "schema15.xml");
-    long start = System.currentTimeMillis();
+    RTimer timer = new RTimer();
     for (String name : names) {
       IndexSchema schema = IndexSchemaFactory.buildIndexSchema(name, config);
     }
-    System.out.println("time taken : "+ (System.currentTimeMillis() -start));
+    System.out.println(timer.stop());
   }
 }