### Eclipse Workspace Patch 1.0 #P testoo Index: data/pvt_benchmark/sc_plain_4sh_5kcell.xls =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sc_plain_4sh_5kcell.xls =================================================================== --- data/pvt_benchmark/sc_plain_4sh_5kcell.xls (revision 0) +++ data/pvt_benchmark/sc_plain_4sh_5kcell.xls (working copy) Property changes on: data/pvt_benchmark/sc_plain_4sh_5kcell.xls ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sc_complex_13sh_4kcell.xls =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sc_complex_13sh_4kcell.xls =================================================================== --- data/pvt_benchmark/sc_complex_13sh_4kcell.xls (revision 0) +++ data/pvt_benchmark/sc_complex_13sh_4kcell.xls (working copy) Property changes on: data/pvt_benchmark/sc_complex_13sh_4kcell.xls ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods =================================================================== --- data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods (revision 0) +++ data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods (working copy) Property changes on: data/pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sd_complex_51p_odf1.2.odp =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sd_complex_51p_odf1.2.odp =================================================================== --- data/pvt_benchmark/sd_complex_51p_odf1.2.odp (revision 0) +++ data/pvt_benchmark/sd_complex_51p_odf1.2.odp (working copy) Property changes on: data/pvt_benchmark/sd_complex_51p_odf1.2.odp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sd_complex_51p.ppt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sd_complex_51p.ppt =================================================================== --- data/pvt_benchmark/sd_complex_51p.ppt (revision 0) +++ data/pvt_benchmark/sd_complex_51p.ppt (working copy) Property changes on: data/pvt_benchmark/sd_complex_51p.ppt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods =================================================================== --- data/pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods (revision 0) +++ data/pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods (working copy) Property changes on: data/pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: src/testcase/performance/benchmark/GenerateReports.java =================================================================== --- src/testcase/performance/benchmark/GenerateReports.java (revision 0) +++ src/testcase/performance/benchmark/GenerateReports.java (working copy) @@ -0,0 +1,267 @@ +package testcase.performance.benchmark; + +import java.io.File; +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; + +import java.text.NumberFormat; +import java.util.Iterator; +import java.util.Map; +import java.util.HashMap; +import java.util.ArrayList; +import java.lang.Math; + +import org.junit.Before; +import org.junit.Test; +import org.openoffice.test.common.FileUtil; + +import testlib.CalcUtil; + +import static org.openoffice.test.vcl.Tester.sleep; +import static org.openoffice.test.vcl.Tester.typeKeys; +import static testlib.AppUtil.*; +import static testlib.UIMap.SC_InsertColumnsRowsdialog; +import static testlib.UIMap.app; +import static testlib.UIMap.dialog; +import static testlib.UIMap.startcenter; +import static testlib.UIMap.writer; +import static testlib.CalcUtil.*; +import static testlib.UIMap.*; + +public class GenerateReports { + static public void computeResults(String resultDir) + { + try { + Map> map = new HashMap>(); + BufferedReader in = new BufferedReader(new FileReader(resultDir)); + String line = in.readLine(); + String testScenario; + String testResult; + + while(line != null) + { + testScenario = line.substring(0, line.indexOf(":")); + testResult = line.substring(line.indexOf(":") + 2); + System.out.println(testScenario + " " + testResult); + if(map.containsKey(testScenario)) + { + map.get(testScenario).add(testResult); + } + else + { + ArrayList array = new ArrayList(); + array.add(testResult); + map.put(testScenario, array); + } + line = in.readLine(); + } + + + Iterator iter = map.keySet().iterator(); + while(iter.hasNext()) + { + String key = (String)iter.next(); + ArrayList val = (ArrayList)map.get(key); + + if(val.size() < 8) + { + continue; + } + + //Remove the first round result; + val.remove(0); + val.trimToSize(); + + //Find the min and max value; + Iterator iter1 = val.listIterator(); + int min_index = 0, max_index = 0, curr_index = 0; + long min, max, curr_value; + min = max = Long.parseLong((String)iter1.next()); + while(iter1.hasNext()) + { + curr_index++; + curr_value = Long.parseLong((String)iter1.next()); + if(curr_value <= min) + { + min = curr_value; + min_index = curr_index; + } + + if(curr_value > max) + { + max = curr_value; + max_index = curr_index; + } + } + + if(min_index > max_index) + { + val.remove(min_index); + val.remove(max_index); + } + else + { + val.remove(max_index); + val.remove(min_index); + } + + + System.out.println("Map removed value: "); + System.out.println("Key: " + key + " ;Value: " + (ArrayList)map.get(key)); + + //Compute the average and standard deviation value of the 5 left round result + Iterator iter2 = val.listIterator(); + double average = 0; + long sum = 0; + while(iter2.hasNext()) + { +// System.out.println("Result: " + (String)iter2.next()); + sum += Long.parseLong((String)iter2.next()); + } + + average = sum / 5; + + Iterator iter3 = val.listIterator(); + double stdev = 0; + sum = 0; + while(iter3.hasNext()) + { + long curr_result = Long.parseLong((String)iter3.next()); + sum += (curr_result - average) * (curr_result - average); + } + + average = average / 1000; + stdev = Math.sqrt(sum / 4) / 1000; + + val.add(Double.toString(average)); + val.add(Double.toString(stdev)); + + System.out.println(val.size()); + } + + String resultOdsFile = new File(System.getProperty("testspace", "../testspace")).getAbsolutePath() + "/output/output_start.ods"; + + writeResultToFile(map, resultOdsFile); + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + + } + + static void writeResultToFile(Map> m, String report_dir) + { +// initApp(); + startcenter.menuItem("File->Open...").select(); + submitOpenDlg(report_dir); + sleep(10); + + CalcUtil.selectRange("Spread.F1"); + calc.menuItem("Insert->Columns").select(); +// SC_InsertColumnsRowsdialog.ok(); + sleep(1); + +// fillReport(m, "Spread.F13", "New Document Result"); +// fillReport(m, "Spread.F15", "New Presentation Result"); +// fillReport(m, "Spread.F17", "New Spreadsheet Result"); + fillReport(m, "Spread.F3", "Plain ODT Load Show Result"); + fillReport(m, "Spread.F4", "Complex ODT Load Show Result"); + fillReport(m, "Spread.F5", "Plain ODT Load Finish Result"); + fillReport(m, "Spread.F6", "Complex ODT Load Finish Result"); + fillReport(m, "Spread.F7", "Plain DOC Load Show Result"); + fillReport(m, "Spread.F8", "Complex DOC Load Show Result"); + fillReport(m, "Spread.F9", "Plain DOC Load Finish Result"); + fillReport(m, "Spread.F10", "Complex DOC Load Finish Result"); + fillReport(m, "Spread.F11", "Plain ODP Load Show Result"); + fillReport(m, "Spread.F12", "Complex ODP Load Show Result"); + fillReport(m, "Spread.F13", "Plain ODP Load Finish Result"); + fillReport(m, "Spread.F14", "Complex ODP Load Finish Result"); + fillReport(m, "Spread.F15", "Plain PPT Load Show Result"); + fillReport(m, "Spread.F16", "Complex PPT Load Show Result"); + fillReport(m, "Spread.F17", "Plain PPT Load Finish Result"); + fillReport(m, "Spread.F18", "Complex PPT Load Finish Result"); + fillReport(m, "Spread.F19", "Plain ODS Load Show Result"); + fillReport(m, "Spread.F20", "Complex ODS Load Show Result"); + fillReport(m, "Spread.F21", "Plain XLS Load Show Result"); + fillReport(m, "Spread.F22", "Complex XLS Load Show Result"); + fillReport(m, "Spread.F23", "Plain ODT Save Result"); + fillReport(m, "Spread.F24", "Complex ODT Save Result"); + fillReport(m, "Spread.F25", "Plain DOC Save Result"); + fillReport(m, "Spread.F26", "Complex DOC Save Result"); + fillReport(m, "Spread.F27", "Plain ODP Save Result"); + fillReport(m, "Spread.F28", "Complex ODP Save Result"); + fillReport(m, "Spread.F29", "Plain PPT Save Result"); + fillReport(m, "Spread.F30", "Complex PPT Save Result"); + fillReport(m, "Spread.F31", "Plain ODS Save Result"); + fillReport(m, "Spread.F32", "Complex ODS Save Result"); + fillReport(m, "Spread.F33", "Plain XLS Save Result"); + fillReport(m, "Spread.F34", "Complex XLS Save Result"); +// fillReport(m, "Spread.F51", "SD-SShow Complex odp Slider Show Result"); + + //Save the text document + calc.menuItem("File->Save As...").select(); + String saveTo = new File(System.getProperty("testspace", "../testspace")).getAbsolutePath() + "/output/output_start_1.ods"; + FileUtil.deleteFile(saveTo); + submitSaveDlg(saveTo); +// if (dialog("33388").exists(3)) +// dialog("33388").ok(); + sleep(2); + calc.menuItem("File->Exit").select(); + + } + + static void fillReport(Map> m, String cell, String scenario) + { + ArrayList raw_data = m.get(scenario); + +// Iterator iter1 = raw_data.listIterator(); +// while(iter1.hasNext()) +// { +// System.out.println(iter1.next()); +// } + +// NumberFormat nbf = NumberFormat.getInstance(); +// nbf.setMinimumFractionDigits(2); +// nbf.setMaximumFractionDigits(2); + String result; + if(raw_data.size() == 1) + { + System.out.println("alsdjf"); + result = raw_data.get(0); + } + else + { +// result = " " + nbf.format(raw_data.get(raw_data.size() - 2)) + "/ " + nbf.format(raw_data.get(raw_data.size() - 1)); + result = new java.text.DecimalFormat("0.00").format(Double.parseDouble(raw_data.get(raw_data.size() - 2))).toString() + "/ " + new java.text.DecimalFormat("0.00").format(Double.parseDouble(raw_data.get(raw_data.size() - 1))).toString(); +// result = raw_data.get(raw_data.size() - 2) + "/ " + raw_data.get(raw_data.size() - 1); + } + CalcUtil.selectRange(cell); + typeKeys(result + ""); + } + + static void printMap(Map> m) + { + Iterator iter = m.keySet().iterator(); + while(iter.hasNext()) + { + String key = (String)iter.next(); + System.out.println("Key: " + key + "; Value: " + m.get(key)); + } + } + @Before + public void setUp(){ + app.start(); + } + + @Test + public void genReport() + { + computeResults("D:\\Work\\MyWorkplace\\testspace\\output\\pvt_filter_results.txt"); + } +} Index: src/testcase/performance/benchmark/Filter.java =================================================================== --- src/testcase/performance/benchmark/Filter.java (revision 0) +++ src/testcase/performance/benchmark/Filter.java (working copy) @@ -0,0 +1,427 @@ +package testcase.performance.benchmark; + +import static testlib.AppUtil.*; +import static testlib.UIMap.*; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.openoffice.test.common.Testspace; + + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + +import static org.openoffice.test.vcl.Tester.*; + +public class Filter { + + @Before + public void setUp(){ + app.start(); + } + + @Test + public void pvtFilter() + { + String pvt_result_path = new File(System.getProperty("testspace", "../testspace")).getAbsolutePath() + "/output/pvt_filter_results.txt"; + String testspacePath = new File(System.getProperty("testspace", "../testspace")).getAbsolutePath(); + String counterLists = testspacePath + "\\data\\pvt_benchmark\\perfmon\\counterlist.txt"; + String counterOutput = testspacePath + "\\output\\output_perfmon"; + String createCounters = testspacePath + "\\data\\pvt_benchmark\\perfmon\\createCounters.bat"; + String stopCounters = testspacePath + "\\data\\pvt_benchmark\\perfmon\\stopCounters.bat"; + + Testspace.prepareData("pvt_benchmark/perfmon/counterlist.txt"); + Testspace.prepareData("pvt_benchmark/perfmon/createCounters.bat"); + Testspace.prepareData("pvt_benchmark/perfmon/stopCounters.bat"); + Testspace.prepareData("pvt_benchmark/output_start.ods", "/output/output_start.ods"); + + try { + String []cmdargs_start = {"cmd.exe", "/C", "start", createCounters, counterOutput, counterLists}; + java.lang.Runtime.getRuntime().exec(cmdargs_start); + sleep(5); + FileWriter out = new FileWriter(pvt_result_path); + out.write("Test Start: " + System.getProperty("line.separator")); + for(int i = 0; i < 8; i++) + { + System.out.println("This is the " + i + " time"); +// out.write("New Document Result: " + perfNew("Text Document") + System.getProperty("line.separator")); +// out.flush(); +// out.write("New Presentation Result: " + perfNew("Presentation") + System.getProperty("line.separator")); +// out.flush(); +// out.write("New Spreadsheet Result: " + perfNew("Spreadsheet") + System.getProperty("line.separator")); +// out.flush(); + + out.write("Plain ODT Load Show Result: " + perfLoadShow("pvt_benchmark/sw_plain_120p_odf1.2.odt") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain DOC Load Show Result: " + perfLoadShow("pvt_benchmark/sw_plain_120p.doc") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODT Load Show Result: " + perfLoadShow("pvt_benchmark/sw_complex_100p_odf1.2.odt") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex DOC Load Show Result: " + perfLoadShow("pvt_benchmark/sw_complex_100p.doc") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain ODP Load Show Result: " + perfLoadShow("pvt_benchmark/sd_plain_50p_odf1.2.odp") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain PPT Load Show Result: " + perfLoadShow("pvt_benchmark/sd_plain_50p.ppt") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODP Load Show Result: " + perfLoadShow("pvt_benchmark/sd_complex_51p_odf1.2.odp") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex PPT Load Show Result: " + perfLoadShow("pvt_benchmark/sd_complex_51p.ppt") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain ODS Load Show Result: " + perfLoadShow("pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain XLS Load Show Result: " + perfLoadShow("pvt_benchmark/sc_plain_4sh_5kcell.xls") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODS Load Show Result: " + perfLoadShow("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex XLS Load Show Result: " + perfLoadShow("pvt_benchmark/sc_complex_13sh_4kcell.xls") + System.getProperty("line.separator")); + out.flush(); + + out.write("Plain ODT Load Finish Result: " + perfLoadFinish("pvt_benchmark/sw_plain_120p_odf1.2.odt", 110) + System.getProperty("line.separator")); + out.flush(); + out.write("Plain DOC Load Finish Result: " + perfLoadFinish("pvt_benchmark/sw_plain_120p.doc", 110) + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODT Load Finish Result: " + perfLoadFinish("pvt_benchmark/sw_complex_100p_odf1.2.odt", 100) + System.getProperty("line.separator")); + out.flush(); + out.write("Complex DOC Load Finish Result: " + perfLoadFinish("pvt_benchmark/sw_complex_100p.doc", 95) + System.getProperty("line.separator")); + out.flush(); + out.write("Plain ODP Load Finish Result: " + perfLoadFinish("pvt_benchmark/sd_plain_50p_odf1.2.odp", 50) + System.getProperty("line.separator")); + out.flush(); + out.write("Plain PPT Load Finish Result: " + perfLoadFinish("pvt_benchmark/sd_plain_50p.ppt", 50) + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODP Load Finish Result: " + perfLoadFinish("pvt_benchmark/sd_complex_51p_odf1.2.odp", 51) + System.getProperty("line.separator")); + out.flush(); + out.write("Complex PPT Load Finish Result: " + perfLoadFinish("pvt_benchmark/sd_complex_51p.ppt", 51) + System.getProperty("line.separator")); + out.flush(); + + out.write("Plain ODT Save Result: " + perfSave("pvt_benchmark/sw_plain_120p_odf1.2.odt") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain DOC Save Result: " + perfSave("pvt_benchmark/sw_plain_120p.doc") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODT Save Result: " + perfSave("pvt_benchmark/sw_complex_100p_odf1.2.odt") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex DOC Save Result: " + perfSave("pvt_benchmark/sw_complex_100p.doc") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain ODP Save Result: " + perfSave("pvt_benchmark/sd_plain_50p_odf1.2.odp") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain PPT Save Result: " + perfSave("pvt_benchmark/sd_plain_50p.ppt") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODP Save Result: " + perfSave("pvt_benchmark/sd_complex_51p_odf1.2.odp") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex PPT Save Result: " + perfSave("pvt_benchmark/sd_complex_51p.ppt") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain ODS Save Result: " + perfSave("pvt_benchmark/sc_plain_4sh_5kcell_new_odf1.2.ods") + System.getProperty("line.separator")); + out.flush(); + out.write("Plain XLS Save Result: " + perfSave("pvt_benchmark/sc_plain_4sh_5kcell.xls") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex ODS Save Result: " + perfSave("pvt_benchmark/sc_complex_13sh_4kcell_new_odf1.2.ods") + System.getProperty("line.separator")); + out.flush(); + out.write("Complex XLS Save Result: " + perfSave("pvt_benchmark/sc_complex_13sh_4kcell.xls") + System.getProperty("line.separator")); + out.flush(); + } + out.close(); + String []cmdargs_end = {"cmd.exe", "/C", "start", stopCounters}; + java.lang.Runtime.getRuntime().exec(cmdargs_end); + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + + GenerateReports genReport = new GenerateReports(); + genReport.computeResults(pvt_result_path); + + } + + public long perfNew(String fileType) + { + System.out.println("New " + fileType); + startcenter.menuItem("File->New->" + fileType).select(); +// startcenter.menuItem("File->New->Spreadsheet").select(); + long tr = System.currentTimeMillis(); +// System.out.println("1: " + tr); + while(true) + { + if(fileType.equals("Text Document")) + { + if(writer.exists()) + { + break; + } + } + +// else{ + if(fileType.equals("Presentation")) + { +// System.out.println("2: " + System.currentTimeMillis()); + if(impress.exists()) + { +// System.out.println("3: " + System.currentTimeMillis()); + break; + } + } +// else +// { + if(calc.exists()) + { + break; + } +// } +// } + + } +// System.out.println("4: " + System.currentTimeMillis()); + tr = System.currentTimeMillis() - tr; + + if(fileType.equals("Text Document")) + { + writer.menuItem("File->Close").select(); + } + + if(fileType.equals("Presentation")) + { + impress.menuItem("File->Close").select(); + } + + if(fileType.equals("Spreadsheet")) + { + calc.menuItem("File->Close").select(); + } + + return tr; + } + + public long perfLoadShow(String fileName) + { + System.out.println(fileName + " Load Show"); + long tr = 0; + String file = testFile(fileName); + startcenter.menuItem("File->Open...").select(); + FilePicker_Path.setText(file); + FilePicker_Open.click(); +// submitOpenDlg(file); + tr = System.currentTimeMillis(); + while(true) + { + if(fileName.contains("odt") || fileName.contains("doc") || fileName.contains("docx")) + { + if(writer.exists()) + { +// writer.menuItem("File->Close").select(); + break; + } + } + + if(fileName.contains("odp") || fileName.contains("ppt") || fileName.contains("pptx")) + { + if(impress.exists()) + { +// impress.menuItem("File->Close").select(); + break; + } + } + + if(fileName.contains("ods") || fileName.contains("xls") || fileName.contains("xlsx")) + { + if(calc.exists()) + { +// calc.menuItem("File->Close").select(); + break; + } + } + } + tr = System.currentTimeMillis() - tr; + sleep(2); + + if(fileName.contains("odt") || fileName.contains("doc") || fileName.contains("docx")) + { + writer.menuItem("File->Close").select(); + } + + if(fileName.contains("odp") || fileName.contains("ppt") || fileName.contains("pptx")) + { + impress.menuItem("File->Close").select(); + } + + if(fileName.contains("ods") || fileName.contains("xls") || fileName.contains("xlsx")) + { + calc.menuItem("File->Close").select(); + } + + return tr; + } + + public long perfLoadFinish(String fileName, int destPage) + { + System.out.println(fileName + " Load Finish"); + long tr = 0; + String file = testFile(fileName); + startcenter.menuItem("File->Open...").select(); +// submitOpenDlg(file); + FilePicker_Path.setText(file); + FilePicker_Open.click(); + tr = System.currentTimeMillis(); + while(true) + { + if(getLoadedPage(fileName) >= destPage) + { + break; + } + } + tr = System.currentTimeMillis() - tr; + sleep(5); + System.out.println("Load Finish Time: " + tr); + + if(fileName.contains("odt") || fileName.contains("doc") || fileName.contains("docx")) + { + writer.menuItem("File->Close").select(); + } + + if(fileName.contains("odp") || fileName.contains("ppt") || fileName.contains("pptx")) + { + impress.menuItem("File->Close").select(); + } + + if(fileName.contains("ods") || fileName.contains("xls") || fileName.contains("xlsx")) + { + calc.menuItem("File->Close").select(); + } + return tr; + } + + public static int getLoadedPage(String docName) + { + String tmp = ""; + if(docName.endsWith("odt") || docName.endsWith("doc") || docName.endsWith("docx")) + { + tmp = statusbar("FWK_HID_STATUSBAR").getItemText(0); + } + if(docName.endsWith("odp") || docName.endsWith("ppt") || docName.endsWith("pptx")) + { + tmp = statusbar("FWK_HID_STATUSBAR").getItemText(4); + } + //System.out.println(tmp); + String s[]= tmp.split("/"); +// System.out.println(Integer.parseInt(s[1].trim())); + return Integer.parseInt(s[1].trim()); + } + + public long perfSave(String fileName_i) + { + System.out.println(fileName_i + " Save"); + String fileName = fileName_i.substring(14); +// System.out.println(fileName); + long tr = 0; + sleep(2); + String file = testFile(fileName_i); + startcenter.menuItem("File->Open...").select(); + submitOpenDlg(file); + sleep(8); + if(fileName.startsWith("sw")){ + if(fileName.startsWith("sw_complex")){ + typeKeys(""); + if(fileName.endsWith("odt")){ +// writer.click(180,300); + typeKeys(""); + sleep(2); + typeKeys(""); + sleep(2); + typeKeys(""); + sleep(2); + typeKeys(""); + sleep(2); + typeKeys(""); + }else{ +// writer.click(180,300); +// org.vclauto.Tester.typeKeys(""); +// org.vclauto.Tester.typeKeys(""); + typeKeys(""); + sleep(2); +// System.out.println("Enter"); + typeKeys(""); +// System.out.println("backspace"); + } + }else{ +// writer.click(180,300); +// writer.click(); + typeKeys(""); + typeKeys(""); + } + } + else if(fileName.startsWith("sd")){ +// writer.click(436, 326); +// presenter.click(); +// sleep(2); +// org.vclauto.Tester.typeKeys(""); +// sleep(1); +// org.vclauto.Tester.typeKeys(""); +// sleep(1); +// org.vclauto.Tester.typeKeys(""); +// sleep(1); +// org.vclauto.Tester.typeKeys(""); +// System.out.println("SD"); + impress.menuItem("Insert->Slide").select(); +// System.out.println("Insert slide"); + sleep(5); + impress.menuItem("Edit->Delete Slide").select(); +// System.out.println("Delete slide"); + sleep(5); + + }else{ +// writer.click(100, 220); + typeKeys("1"); + typeKeys(""); + typeKeys(""); + typeKeys(""); + } + sleep(5); + + typeKeys(""); + tr = System.currentTimeMillis(); + + int index = 0; + if(fileName.endsWith("odt") || fileName.endsWith("doc") || fileName.endsWith("docx")) + { + index = 5; + } + if(fileName.endsWith("odp") || fileName.endsWith("ppt") || fileName.endsWith("pptx")) + { + index = 2; + } + if(fileName.endsWith("ods") || fileName.endsWith("xls") || fileName.endsWith("xlsx")) + { + index = 4; + } + while(true) + { +// System.out.println(statusbar("FWK_HID_STATUSBAR").getItemText(index)); + if(statusbar("FWK_HID_STATUSBAR").getItemText(index).equals(" ")) + { + break; + } + } + tr = System.currentTimeMillis() - tr; + + sleep(2); + + if(fileName.contains("odt") || fileName.contains("doc") || fileName.contains("docx")) + { + writer.menuItem("File->Close").select(); + } + + if(fileName.contains("odp") || fileName.contains("ppt") || fileName.contains("pptx")) + { + impress.menuItem("File->Close").select(); + } + + if(fileName.contains("ods") || fileName.contains("xls") || fileName.contains("xlsx")) + { + calc.menuItem("File->Close").select(); + } + return tr; + } + +} Index: data/pvt_benchmark/perfmon/counterlist.txt =================================================================== --- data/pvt_benchmark/perfmon/counterlist.txt (revision 0) +++ data/pvt_benchmark/perfmon/counterlist.txt (working copy) @@ -0,0 +1,12 @@ +;System +\Memory\Available Bytes +\Memory\Page Reads/sec +\Memory\Pages Input/sec +\PhysicalDisk(_Total)\Disk Read Bytes/sec +\PhysicalDisk(_Total)\Disk Reads/sec +;Process(soffice.bin, symphony.exe, java.exe) +\Process(soffice.bin)\% Processor Time +\Process(soffice.bin)\Handle Count +\Process(soffice.bin)\Private Bytes +\Process(soffice.bin)\Thread Count +\Process(soffice.bin)\Working Set \ No newline at end of file Index: data/pvt_benchmark/sw_plain_120p.doc =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sw_plain_120p.doc =================================================================== --- data/pvt_benchmark/sw_plain_120p.doc (revision 0) +++ data/pvt_benchmark/sw_plain_120p.doc (working copy) Property changes on: data/pvt_benchmark/sw_plain_120p.doc ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sw_complex_100p_odf1.2.odt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sw_complex_100p_odf1.2.odt =================================================================== --- data/pvt_benchmark/sw_complex_100p_odf1.2.odt (revision 0) +++ data/pvt_benchmark/sw_complex_100p_odf1.2.odt (working copy) Property changes on: data/pvt_benchmark/sw_complex_100p_odf1.2.odt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/perfmon/resumeCounters.bat =================================================================== --- data/pvt_benchmark/perfmon/resumeCounters.bat (revision 0) +++ data/pvt_benchmark/perfmon/resumeCounters.bat (working copy) @@ -0,0 +1,2 @@ +logman start pvt +exit \ No newline at end of file Index: data/pvt_benchmark/sw_complex_100p.doc =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sw_complex_100p.doc =================================================================== --- data/pvt_benchmark/sw_complex_100p.doc (revision 0) +++ data/pvt_benchmark/sw_complex_100p.doc (working copy) Property changes on: data/pvt_benchmark/sw_complex_100p.doc ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/perfmon/stopCounters.bat =================================================================== --- data/pvt_benchmark/perfmon/stopCounters.bat (revision 0) +++ data/pvt_benchmark/perfmon/stopCounters.bat (working copy) @@ -0,0 +1 @@ +logman stop pvt \ No newline at end of file Index: data/pvt_benchmark/perfmon/createCounters.bat =================================================================== --- data/pvt_benchmark/perfmon/createCounters.bat (revision 0) +++ data/pvt_benchmark/perfmon/createCounters.bat (working copy) @@ -0,0 +1,6 @@ +logman stop pvt +logman delete counter pvt +logman create counter pvt -cf %2 +logman update pvt -si 10 -f csv -o %1 +logman start pvt +exit \ No newline at end of file Index: data/pvt_benchmark/sd_plain_50p_odf1.2.odp =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sd_plain_50p_odf1.2.odp =================================================================== --- data/pvt_benchmark/sd_plain_50p_odf1.2.odp (revision 0) +++ data/pvt_benchmark/sd_plain_50p_odf1.2.odp (working copy) Property changes on: data/pvt_benchmark/sd_plain_50p_odf1.2.odp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/output_start.ods =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/output_start.ods =================================================================== --- data/pvt_benchmark/output_start.ods (revision 0) +++ data/pvt_benchmark/output_start.ods (working copy) Property changes on: data/pvt_benchmark/output_start.ods ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sd_plain_50p.ppt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sd_plain_50p.ppt =================================================================== --- data/pvt_benchmark/sd_plain_50p.ppt (revision 0) +++ data/pvt_benchmark/sd_plain_50p.ppt (working copy) Property changes on: data/pvt_benchmark/sd_plain_50p.ppt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream Index: data/pvt_benchmark/sw_plain_120p_odf1.2.odt =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: data/pvt_benchmark/sw_plain_120p_odf1.2.odt =================================================================== --- data/pvt_benchmark/sw_plain_120p_odf1.2.odt (revision 0) +++ data/pvt_benchmark/sw_plain_120p_odf1.2.odt (working copy) Property changes on: data/pvt_benchmark/sw_plain_120p_odf1.2.odt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream