| BasicFuncOnWriter.java (739258c9) | BasicFuncOnWriter.java (ac2ddd9c) |
|---|---|
| 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 46 unchanged lines hidden (view full) --- 55 56 @Rule 57 public TestName testname = new TestName(); 58 59 private static DataSheet xmlResult; 60 61 private String pid = null; 62 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 46 unchanged lines hidden (view full) --- 55 56 @Rule 57 public TestName testname = new TestName(); 58 59 private static DataSheet xmlResult; 60 61 private String pid = null; 62 |
| 63 private static int iterator = 100; | 63 private static int iterator = 2; |
| 64 65 private int i = 0; 66 67 /** 68 * @throws java.lang.Exception 69 */ 70 @BeforeClass 71 public static void beforeClass() throws Exception { | 64 65 private int i = 0; 66 67 /** 68 * @throws java.lang.Exception 69 */ 70 @BeforeClass 71 public static void beforeClass() throws Exception { |
| 72 73 xmlResult = new DataSheet(getFile("output/svt_gui_sw.xml")); 74 xmlResult.addRow("BasicFuncOnWriter","Method", "Iterator", "Consumed Time(MS)", 75 "Memory(KB)", "CPU(%)"); | 72 xmlResult = new DataSheet(getFile("output/svt.xml")); 73 xmlResult.addRow("Data", "Method", "No", "Consumed Time(MS)", "Memory(VSZ)", "Memory(RSS)", "Handles(Windows Only)"); |
| 76 } 77 78 @AfterClass 79 public static void afterClass() throws Exception { 80 app.stop(); 81 } 82 83 @Before --- 351 unchanged lines hidden (view full) --- 435 public void InsertChartToOpenedSW() throws Exception { 436 String file = prepareData("pvt/plain_200p.odt"); 437 for (i = 1; i <= iterator; i++) { 438 long start = System.currentTimeMillis(); 439 app.dispatch(".uno:Open"); 440 submitOpenDlg(file); 441 writer.waitForExistence(10, 2); 442 writer.focus(); | 74 } 75 76 @AfterClass 77 public static void afterClass() throws Exception { 78 app.stop(); 79 } 80 81 @Before --- 351 unchanged lines hidden (view full) --- 433 public void InsertChartToOpenedSW() throws Exception { 434 String file = prepareData("pvt/plain_200p.odt"); 435 for (i = 1; i <= iterator; i++) { 436 long start = System.currentTimeMillis(); 437 app.dispatch(".uno:Open"); 438 submitOpenDlg(file); 439 writer.waitForExistence(10, 2); 440 writer.focus(); |
| 443 writer.menuItem("Insert->Object->Chart...").select(); | 441 app.dispatch(".uno:InsertObjectChart"); 442// writer.menuItem("Insert->Object->Chart...").select(); |
| 444 sleep(5); 445 typeKeys("<esc>"); 446 sleep(5); 447 typeKeys("<esc>"); 448 sleep(5); 449 typeKeys("<esc>"); 450 sleep(5); 451 closeWithoutSaveSW(); --- 57 unchanged lines hidden (view full) --- 509 private void closeWithoutSaveSW() { 510 writer.menuItem("File->Close").select(); 511 if (activeMsgBox.exists()) { 512 activeMsgBox.no(); 513 sleep(2); 514 } 515 } 516 | 443 sleep(5); 444 typeKeys("<esc>"); 445 sleep(5); 446 typeKeys("<esc>"); 447 sleep(5); 448 typeKeys("<esc>"); 449 sleep(5); 450 closeWithoutSaveSW(); --- 57 unchanged lines hidden (view full) --- 508 private void closeWithoutSaveSW() { 509 writer.menuItem("File->Close").select(); 510 if (activeMsgBox.exists()) { 511 activeMsgBox.no(); 512 sleep(2); 513 } 514 } 515 |
| 517 private HashMap<String, Object> getPerfData() { 518 HashMap<String, Object> proccessInfo = SystemUtil 519 .findProcess(".*(soffice\\.bin|soffice\\.exe|soffice).*"); 520 String pid = (String) proccessInfo.get("pid"); 521 return SystemUtil.getProcessPerfData(pid); 522 } 523 | |
| 524 private void addRecord(int i, long start, long end) { | 516 private void addRecord(int i, long start, long end) { |
| 525 HashMap<String, Object> perf = getPerfData(); 526 xmlResult.addRow("BasicFuncOnWriter",testname.getMethodName(), i, (end - start), 527 perf.get("rss"), perf.get("pcpu")); | 517 HashMap<String, Object> perf = aoo.getPerfData(); 518 xmlResult.addRow("Data",testname.getMethodName(), i, (end - start), 519 perf.get("vsz"), perf.get("rss"), perf.get("handles")); |
| 528 } 529 530} | 520 } 521 522} |