hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1237511 - in /hive/trunk: hbase-handler/src/test/templates/ ql/src/test/templates/
Date Mon, 30 Jan 2012 00:26:59 GMT
Author: cws
Date: Mon Jan 30 00:26:59 2012
New Revision: 1237511

URL: http://svn.apache.org/viewvc?rev=1237511&view=rev
Log:
HIVE-2760 [jira] TestCliDriver should log elapsed time

Summary: HIVE-2760. TestCliDriver should log elapsed time

Test Plan: EMPTY

Reviewers: JIRA, ashutoshc

Reviewed By: ashutoshc

CC: ashutoshc, cwsteinbach

Differential Revision: https://reviews.facebook.net/D1503

Modified:
    hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm
    hive/trunk/ql/src/test/templates/TestCliDriver.vm
    hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm
    hive/trunk/ql/src/test/templates/TestParse.vm
    hive/trunk/ql/src/test/templates/TestParseNegative.vm

Modified: hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm
URL: http://svn.apache.org/viewvc/hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm?rev=1237511&r1=1237510&r2=1237511&view=diff
==============================================================================
--- hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm (original)
+++ hive/trunk/hbase-handler/src/test/templates/TestHBaseCliDriver.vm Mon Jan 30 00:26:59
2012
@@ -85,6 +85,7 @@ public class $className extends TestCase
   #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testCliDriver_$tname() throws Exception {
+    long startTime = System.currentTimeMillis();
     try {
       System.out.println("Begin query: " + "$fname");
       qt.cliInit("$fname");
@@ -118,11 +119,13 @@ public class $className extends TestCase
     } catch (Throwable e) {
       System.out.println("Exception: " + e.getMessage());
       e.printStackTrace();
+      System.out.println("Failed query: " + "$fname");
       System.out.flush();
       fail("Unexpected exception");
     }
 
-    System.out.println("Done query: " + "$fname");
+    long elapsedTime = System.currentTimeMillis() - startTime;
+    System.out.println("Done query: " + "$fname" + " elapsedTime=" + elapsedTime/1000 + "s");
     assertTrue("Test passed", true);
   }
 

Modified: hive/trunk/ql/src/test/templates/TestCliDriver.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestCliDriver.vm?rev=1237511&r1=1237510&r2=1237511&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestCliDriver.vm (original)
+++ hive/trunk/ql/src/test/templates/TestCliDriver.vm Mon Jan 30 00:26:59 2012
@@ -103,6 +103,7 @@ public class $className extends TestCase
   #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testCliDriver_$tname() throws Exception {
+    long startTime = System.currentTimeMillis();
     try {
       System.out.println("Begin query: " + "$fname");
 
@@ -142,11 +143,13 @@ public class $className extends TestCase
     catch (Throwable e) {
       System.out.println("Exception: " + e.getMessage());
       e.printStackTrace();
+      System.out.println("Failed query: " + "$fname");
       System.out.flush();
       fail("Unexpected exception" + debugHint);
     }
 
-    System.out.println("Done query: " + "$fname");
+    long elapsedTime = System.currentTimeMillis() - startTime;
+    System.out.println("Done query: " + "$fname" + " elapsedTime=" + elapsedTime/1000 + "s");
     assertTrue("Test passed", true);
   }
 

Modified: hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm?rev=1237511&r1=1237510&r2=1237511&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm (original)
+++ hive/trunk/ql/src/test/templates/TestNegativeCliDriver.vm Mon Jan 30 00:26:59 2012
@@ -94,6 +94,7 @@ public class $className extends TestCase
   #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testNegativeCliDriver_$tname() throws Exception {
+    long startTime = System.currentTimeMillis();
     try {
       System.out.println("Begin query: " + "$fname");
 
@@ -120,11 +121,13 @@ public class $className extends TestCase
     catch (Throwable e) {
       System.out.println("Exception: " + e.getMessage());
       e.printStackTrace();
+      System.out.println("Failed query: " + "$fname");
       System.out.flush();
       fail("Unexpected exception" + debugHint);
     }
 
-    System.out.println("Done query: " + "$fname");
+    long elapsedTime = System.currentTimeMillis() - startTime;
+    System.out.println("Done query: " + "$fname" + " elapsedTime=" + elapsedTime/1000 + "s");
     assertTrue("Test passed", true);
   }
 

Modified: hive/trunk/ql/src/test/templates/TestParse.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestParse.vm?rev=1237511&r1=1237510&r2=1237511&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestParse.vm (original)
+++ hive/trunk/ql/src/test/templates/TestParse.vm Mon Jan 30 00:26:59 2012
@@ -77,6 +77,7 @@ public class $className extends TestCase
   #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testParse_$tname() throws Exception {
+    long startTime = System.currentTimeMillis();
     try {
       System.out.println("Begin query: " + "$fname");
 
@@ -99,10 +100,13 @@ public class $className extends TestCase
     catch (Throwable e) {
       System.out.println("Exception: " + e.getMessage());
       e.printStackTrace();
+      System.out.println("Failed query: " + "$fname");
       System.out.flush();
       fail("Unexpected exception" + debugHint);
     }
 
+    long elapsedTime = System.currentTimeMillis() - startTime;
+    System.out.println("Done query: " + "$fname" + " elapsedTime=" + elapsedTime/1000 + "s");
     assertTrue("Test passed", true);
   }
 

Modified: hive/trunk/ql/src/test/templates/TestParseNegative.vm
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/templates/TestParseNegative.vm?rev=1237511&r1=1237510&r2=1237511&view=diff
==============================================================================
--- hive/trunk/ql/src/test/templates/TestParseNegative.vm (original)
+++ hive/trunk/ql/src/test/templates/TestParseNegative.vm Mon Jan 30 00:26:59 2012
@@ -77,6 +77,7 @@ public class $className extends TestCase
   #set ($eidx = $fname.indexOf('.'))
   #set ($tname = $fname.substring(0, $eidx))
   public void testParseNegative_$tname() throws Exception {
+    long startTime = System.currentTimeMillis();
     try {
       System.out.println("Begin query: " + "$fname");
 
@@ -102,11 +103,13 @@ public class $className extends TestCase
     catch (Throwable e) {
       System.out.println("Exception: " + e.getMessage());
       e.printStackTrace();
+      System.out.println("Failed query: " + "$fname");
       System.out.flush();
       fail("Unexpected exception" + debugHint);
     }
 
-    System.out.println("Done query: " + "$fname");
+    long elapsedTime = System.currentTimeMillis() - startTime;
+    System.out.println("Done query: " + "$fname" + " elapsedTime=" + elapsedTime/1000 + "s");
     assertTrue("Test passed", true);
   }
 



Mime
View raw message