Changeset 703
- Timestamp:
- Mar 19, 2013, 11:13:17 AM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/backend
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/appexecution/AppExecution.java
r702 r703 6 6 import java.io.InputStream; 7 7 import java.io.InputStreamReader; 8 import java.util.Date; 8 9 import java.util.List; 9 10 import java.util.Vector; … … 24 25 public static AppExecutionResult executeAndWait(Vector<String> cmdLine) 25 26 throws IOException { 27 long start = new Date().getTime(); 26 28 ProcessBuilder pb = new ProcessBuilder(cmdLine); 27 29 pb.redirectErrorStream(true); … … 44 46 e.printStackTrace(); 45 47 } 46 return new AppExecutionResult(proc.exitValue(), cmdLine, lines); 48 return new AppExecutionResult(proc.exitValue(), cmdLine, lines, 49 (int) (new Date().getTime() - start)); 47 50 } 48 51 -
AE/installer2/src/net/oni2/aeinstaller/backend/appexecution/AppExecutionResult.java
r702 r703 19 19 */ 20 20 public Vector<String> output; 21 /** 22 * Time the app was run for 23 */ 24 public int time; 21 25 22 26 /** … … 27 31 * @param output 28 32 * Output of executed program 33 * @param time 34 * Time of execution in ms 29 35 */ 30 36 public AppExecutionResult(int errorCode, Vector<String> cmdLine, 31 Vector<String> output ) {37 Vector<String> output, int time) { 32 38 this.errorCode = errorCode; 33 39 this.cmdLine = cmdLine; 34 40 this.output = output; 41 this.time = time; 35 42 } 36 43 } -
AE/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r702 r703 468 468 listener.installProgressUpdate(0, 1, "Applying XML patches"); 469 469 470 // TODO: REMOVE471 470 long startMS = new Date().getTime(); 472 471 … … 493 492 File levelFolder = new File(tmpFolder, level); 494 493 levelFolder.mkdir(); 495 494 496 495 log.println("\t\tPatches for " + level); 497 496 … … 581 580 582 581 // Remove XML folder as import will only require .oni's 583 //try {584 //FileUtils.deleteDirectory(levelFolderXML);585 //} catch (IOException e) {586 //e.printStackTrace();587 //}582 // try { 583 // FileUtils.deleteDirectory(levelFolderXML); 584 // } catch (IOException e) { 585 // e.printStackTrace(); 586 // } 588 587 589 588 oniLevelFolders.get(level).add(levelFolder); 590 591 log.println(); 592 } 593 594 System.out.println("Took: " + (new Date().getTime() - startMS) 595 + " msec"); 589 } 590 591 log.println("Applying XML patches took " 592 + (new Date().getTime() - startMS) + " ms"); 596 593 } 597 594 … … 599 596 TreeMap<String, Vector<File>> oniLevelFolders, 600 597 InstallProgressListener listener, PrintWriter log) { 598 long startMS = new Date().getTime(); 599 601 600 int totalSteps = 0; 602 601 int stepsDone = 0; … … 619 618 logAppOutput(res, log); 620 619 621 log.println();622 620 stepsDone++; 623 621 } 622 623 log.println("Importing levels took " + (new Date().getTime() - startMS) 624 + " ms"); 625 log.println(); 624 626 } 625 627 … … 928 930 for (String s : result.output) 929 931 log.println("\t\t\t\t" + s); 932 log.println("\t\t\tDuration: " + result.time + " ms"); 930 933 log.println(); 931 934 }
Note:
See TracChangeset
for help on using the changeset viewer.