0 Replies Latest reply on Aug 20, 2008 12:27 PM by (Paul_Reilly)

    [svn] 2930: Fixed up some remaining issues with precompile and postcompile

    Level 1
      Revision: 2930
      Author: preilly@adobe.com
      Date: 2008-08-20 13:27:50 -0700 (Wed, 20 Aug 2008)

      Log Message:
      -----------
      Fixed up some remaining issues with precompile and postcompile
      benchmarking. Now we should get numbers even when
      CompilerAPI.compile() is skipped.

      tests Passed: checkintests

      Needs QA: YES

      Needs DOC: NO

      API Change: NO

      Reviewer: gauravj

      Code-level description of changes:

      tools/Compc.java
      tools/Fcsh.java
      tools/Mxmlc.java
      tools/oem/Application.java
      tools/oem/Library.java

      Updated benchmarking to call stopTime(Benchmark.PRECOMPILE) and
      startTime(Benchmark.POSTCOMPILE) as soon as we know
      CompilerAPI.compile() will be skipped.

      Also, added a check for
      benchmark.hasStarted(Benchmark.POSTCOMPILE) before calling
      stopTime(Benchmark.POSTCOMPILE).

      compiler/util/Benchmark.java

      Divided times Map into startTimes and duration to better handle
      the case when an exception is thrown such that startTime() is
      jumped over.

      Added hasStarted().

      Modified Paths:
      --------------
      flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Benchmark.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/tools/Compc.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/tools/Fcsh.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/tools/Mxmlc.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Application.java
      flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/Library.java