Ignore:
Timestamp:
Mar 19, 2013, 11:13:17 AM (12 years ago)
Author:
alloc
Message:

AEI2 0.99u:

  • Added duration output for executed commands
  • Added total time output for both applying patches and combine binaries tasks of installation
Location:
AE/installer2/src/net/oni2/aeinstaller/backend/appexecution
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • AE/installer2/src/net/oni2/aeinstaller/backend/appexecution/AppExecution.java

    r702 r703  
    66import java.io.InputStream;
    77import java.io.InputStreamReader;
     8import java.util.Date;
    89import java.util.List;
    910import java.util.Vector;
     
    2425        public static AppExecutionResult executeAndWait(Vector<String> cmdLine)
    2526                        throws IOException {
     27                long start = new Date().getTime();
    2628                ProcessBuilder pb = new ProcessBuilder(cmdLine);
    2729                pb.redirectErrorStream(true);
     
    4446                        e.printStackTrace();
    4547                }
    46                 return new AppExecutionResult(proc.exitValue(), cmdLine, lines);
     48                return new AppExecutionResult(proc.exitValue(), cmdLine, lines,
     49                                (int) (new Date().getTime() - start));
    4750        }
    4851
  • AE/installer2/src/net/oni2/aeinstaller/backend/appexecution/AppExecutionResult.java

    r702 r703  
    1919         */
    2020        public Vector<String> output;
     21        /**
     22         * Time the app was run for
     23         */
     24        public int time;
    2125
    2226        /**
     
    2731         * @param output
    2832         *            Output of executed program
     33         * @param time
     34         *            Time of execution in ms
    2935         */
    3036        public AppExecutionResult(int errorCode, Vector<String> cmdLine,
    31                         Vector<String> output) {
     37                        Vector<String> output, int time) {
    3238                this.errorCode = errorCode;
    3339                this.cmdLine = cmdLine;
    3440                this.output = output;
     41                this.time = time;
    3542        }
    3643}
Note: See TracChangeset for help on using the changeset viewer.