incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject svn commit: r1400766 - in /incubator/ooo/trunk/test/testgui/source/svt/gui: sc/BasicFuncOnCalc.java sd/BasicFuncOnImpress.java sw/BasicFuncOnWriter.java sw/FileTypeAboutWriter.java
Date Mon, 22 Oct 2012 05:47:52 GMT
Author: wanglf
Date: Mon Oct 22 05:47:51 2012
New Revision: 1400766

URL: http://svn.apache.org/viewvc?rev=1400766&view=rev
Log:
modify svt result file's data structure

Modified:
    incubator/ooo/trunk/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java
    incubator/ooo/trunk/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java
    incubator/ooo/trunk/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java
    incubator/ooo/trunk/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java

Modified: incubator/ooo/trunk/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java?rev=1400766&r1=1400765&r2=1400766&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java (original)
+++ incubator/ooo/trunk/test/testgui/source/svt/gui/sc/BasicFuncOnCalc.java Mon Oct 22 05:47:51
2012
@@ -86,7 +86,7 @@ public class BasicFuncOnCalc {
 
 	private static DataSheet xmlResult;
 
-	private static int iterator = 100;
+	private static int iterator = 2;
 
 	private int i = 0;
 
@@ -95,8 +95,8 @@ public class BasicFuncOnCalc {
 	 */
 	@BeforeClass
 	public static void beforeClass() throws Exception {
-		xmlResult = new DataSheet(getFile("output/svt.xml"), true);
-		xmlResult.addRow("BasicFuncOnCalc", "Method", "Iterator", "Consumed Time(MS)", "Memory(VSZ)",
"Memory(RSS)", "Handles(Windows Only)");
+		xmlResult = new DataSheet(getFile("output/svt.xml"));
+		xmlResult.addRow("Data", "Method", "No", "Consumed Time(MS)", "Memory(VSZ)", "Memory(RSS)",
"Handles(Windows Only)");
 	}
 
 	@AfterClass
@@ -494,7 +494,7 @@ public class BasicFuncOnCalc {
 
 	private void addRecord(int i, long start, long end) {
 		HashMap<String, Object>  perf = aoo.getPerfData();
-		xmlResult.addRow("BasicFuncOnCalc",testname.getMethodName(), i, (end - start),
+		xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
 				perf.get("vsz"), perf.get("rss"), perf.get("handles"));
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java?rev=1400766&r1=1400765&r2=1400766&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java (original)
+++ incubator/ooo/trunk/test/testgui/source/svt/gui/sd/BasicFuncOnImpress.java Mon Oct 22
05:47:51 2012
@@ -63,7 +63,7 @@ public class BasicFuncOnImpress {
 
 	private String pid = null;
 
-	private static int iterator = 100;
+	private static int iterator = 2;
 
 	private int i = 0;
 
@@ -72,10 +72,8 @@ public class BasicFuncOnImpress {
 	 */
 	@BeforeClass
 	public static void beforeClass() throws Exception {
-
-		xmlResult = new DataSheet(getFile("output/svt_gui_sd.xml"));
-		xmlResult.addRow("BasicFunOnImpress","Method", "Iterator", "Consumed Time(MS)",
-				"Memory(KB)", "CPU(%)");
+		xmlResult = new DataSheet(getFile("output/svt.xml"));
+		xmlResult.addRow("Data", "Method", "No", "Consumed Time(MS)", "Memory(VSZ)", "Memory(RSS)",
"Handles(Windows Only)");
 	}
 
 	@AfterClass
@@ -132,7 +130,8 @@ public class BasicFuncOnImpress {
 		for (i = 1; i <= iterator; i++) {
 			long start = System.currentTimeMillis();
 			createNewSD();
-			impress.menuItem("Insert->Picture->From File...").select();
+			app.dispatch(".uno:InsertGraphic");
+//			impress.menuItem("Insert->Picture->From File...").select();
 			sleep(2);
 			filePickerPath.setText(pic);
 			sleep(1);
@@ -263,6 +262,7 @@ public class BasicFuncOnImpress {
 	}
 	
 	@Test
+	@Ignore
 	public void opChartOnOpenedSD() throws Exception {
 		String file = prepareData("svt/OLEinODP.odp");
 		for (i = 1; i <= iterator; i++) {
@@ -370,16 +370,9 @@ public class BasicFuncOnImpress {
 		}
 	}
 
-	private HashMap<String, Object> getPerfData() {
-		HashMap<String, Object> proccessInfo = SystemUtil
-				.findProcess(".*(soffice\\.bin|soffice\\.exe|soffice).*");
-		String pid = (String) proccessInfo.get("pid");
-		return SystemUtil.getProcessPerfData(pid);
-	}
-
 	private void addRecord(int i, long start, long end) {
-		HashMap<String, Object> perf = getPerfData();
-		xmlResult.addRow("BasicFuncOnImpress",testname.getMethodName(), i, (end - start),
-				perf.get("rss"), perf.get("pcpu"));
+		HashMap<String, Object>  perf = aoo.getPerfData();
+		xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
+				perf.get("vsz"), perf.get("rss"), perf.get("handles"));
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java?rev=1400766&r1=1400765&r2=1400766&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java (original)
+++ incubator/ooo/trunk/test/testgui/source/svt/gui/sw/BasicFuncOnWriter.java Mon Oct 22 05:47:51
2012
@@ -60,7 +60,7 @@ public class BasicFuncOnWriter {
 
 	private String pid = null;
 
-	private static int iterator = 100;
+	private static int iterator = 2;
 
 	private int i = 0;
 
@@ -69,10 +69,8 @@ public class BasicFuncOnWriter {
 	 */
 	@BeforeClass
 	public static void beforeClass() throws Exception {
-
-		xmlResult = new DataSheet(getFile("output/svt_gui_sw.xml"));
-		xmlResult.addRow("BasicFuncOnWriter","Method", "Iterator", "Consumed Time(MS)",
-				"Memory(KB)", "CPU(%)");
+		xmlResult = new DataSheet(getFile("output/svt.xml"));
+		xmlResult.addRow("Data", "Method", "No", "Consumed Time(MS)", "Memory(VSZ)", "Memory(RSS)",
"Handles(Windows Only)");
 	}
 
 	@AfterClass
@@ -440,7 +438,8 @@ public class BasicFuncOnWriter {
 			submitOpenDlg(file);
 			writer.waitForExistence(10, 2);
 			writer.focus();
-			writer.menuItem("Insert->Object->Chart...").select();
+			app.dispatch(".uno:InsertObjectChart");
+//			writer.menuItem("Insert->Object->Chart...").select();
 			sleep(5);
 			typeKeys("<esc>");
 			sleep(5);
@@ -514,17 +513,10 @@ public class BasicFuncOnWriter {
 		}
 	}
 
-	private HashMap<String, Object> getPerfData() {
-		HashMap<String, Object> proccessInfo = SystemUtil
-				.findProcess(".*(soffice\\.bin|soffice\\.exe|soffice).*");
-		String pid = (String) proccessInfo.get("pid");
-		return SystemUtil.getProcessPerfData(pid);
-	}
-
 	private void addRecord(int i, long start, long end) {
-		HashMap<String, Object> perf = getPerfData();
-		xmlResult.addRow("BasicFuncOnWriter",testname.getMethodName(), i, (end - start),
-				perf.get("rss"), perf.get("pcpu"));
+		HashMap<String, Object>  perf = aoo.getPerfData();
+		xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
+				perf.get("vsz"), perf.get("rss"), perf.get("handles"));
 	}
 	
 }

Modified: incubator/ooo/trunk/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java?rev=1400766&r1=1400765&r2=1400766&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java (original)
+++ incubator/ooo/trunk/test/testgui/source/svt/gui/sw/FileTypeAboutWriter.java Mon Oct 22
05:47:51 2012
@@ -60,7 +60,7 @@ public class FileTypeAboutWriter {
 
 	private String pid = null;
 
-	private static int iterator = 100;
+	private static int iterator = 2;
 
 	private int i = 0;
 
@@ -70,10 +70,8 @@ public class FileTypeAboutWriter {
 	 */
 	@BeforeClass
 	public static void beforeClass() throws Exception {
-
-		xmlResult = new DataSheet(getFile("output/svt_gui_type_sw.xml"));
-		xmlResult.addRow("FileTypeAboutWriter","Method", "Iterator", "Consumed Time(MS)",
-				"Memory(KB)", "CPU(%)");
+		xmlResult = new DataSheet(getFile("output/svt.xml"));
+		xmlResult.addRow("Data", "Method", "No", "Consumed Time(MS)", "Memory(VSZ)", "Memory(RSS)",
"Handles(Windows Only)");
 	}
 
 	@AfterClass
@@ -179,21 +177,14 @@ public class FileTypeAboutWriter {
 		submitOpenDlg(saveTo);
 		sleep(2);		
 		app.dispatch(".uno:CloseDoc");
+		
 	}
 	
-
-
-	private HashMap<String, Object> getPerfData() {
-		HashMap<String, Object> proccessInfo = SystemUtil
-				.findProcess(".*(soffice\\.bin|soffice\\.exe|soffice).*");
-		String pid = (String) proccessInfo.get("pid");
-		return SystemUtil.getProcessPerfData(pid);
-	}
-
 	private void addRecord(int i, long start, long end) {
-		HashMap<String, Object> perf = getPerfData();
-		xmlResult.addRow("FileTypeAboutWriter",testname.getMethodName(), i, (end - start),
-				perf.get("rss"), perf.get("pcpu"));
+		HashMap<String, Object>  perf = aoo.getPerfData();
+		xmlResult.addRow("Data",testname.getMethodName(), i, (end - start),
+				perf.get("vsz"), perf.get("rss"), perf.get("handles"));
 	}
+
 	
 }



Mime
View raw message