Package com.google.dart.engine.utilities.instrumentation

Examples of com.google.dart.engine.utilities.instrumentation.InstrumentationBuilder.data()


   * @return the new state of the content
   */
  private CacheState checkContentState(CacheState newState) {
    if (contentState == CacheState.ERROR) {
      InstrumentationBuilder builder = Instrumentation.builder("SourceEntryImpl-checkContentState");
      builder.data("message", "contentState changing from " + contentState + " to " + newState);
      //builder.data("source", source.getFullName());
      builder.record(new AnalysisException());
      builder.log();
    }
    return newState;
View Full Code Here


  private void reportIfSlowIO(long nanos) {
    //If slower than 10ms
    if (nanos > 10 * TimeCounter.NANOS_PER_MILLI) {
      InstrumentationBuilder builder = Instrumentation.builder("SlowIO");
      try {
        builder.data("fileName", getFullName());
        builder.metric("IO-Time-Nanos", nanos);
      } finally {
        builder.log();
      }
    }
View Full Code Here

      throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("ErrorNoCoreLibrary");
    try {
      DartSdk sdk = analysisContext.getSourceFactory().getDartSdk();
      if (sdk == null) {
        instrumentation.data("sdkPath", "--null--");
      } else if (sdk instanceof DirectoryBasedDartSdk) {
        File directory = ((DirectoryBasedDartSdk) sdk).getDirectory();
        if (directory == null) {
          instrumentation.data("sdkDirectoryIsNull", true);
        } else {
View Full Code Here

      if (sdk == null) {
        instrumentation.data("sdkPath", "--null--");
      } else if (sdk instanceof DirectoryBasedDartSdk) {
        File directory = ((DirectoryBasedDartSdk) sdk).getDirectory();
        if (directory == null) {
          instrumentation.data("sdkDirectoryIsNull", true);
        } else {
          instrumentation.data("sdkDirectoryIsNull", false);
          instrumentation.data("sdkPath", directory.getAbsolutePath());
          instrumentation.data("sdkDirectoryExists", directory.exists());
        }
View Full Code Here

      } else if (sdk instanceof DirectoryBasedDartSdk) {
        File directory = ((DirectoryBasedDartSdk) sdk).getDirectory();
        if (directory == null) {
          instrumentation.data("sdkDirectoryIsNull", true);
        } else {
          instrumentation.data("sdkDirectoryIsNull", false);
          instrumentation.data("sdkPath", directory.getAbsolutePath());
          instrumentation.data("sdkDirectoryExists", directory.exists());
        }
      } else {
        instrumentation.data("sdkPath", "--unknown--");
View Full Code Here

        File directory = ((DirectoryBasedDartSdk) sdk).getDirectory();
        if (directory == null) {
          instrumentation.data("sdkDirectoryIsNull", true);
        } else {
          instrumentation.data("sdkDirectoryIsNull", false);
          instrumentation.data("sdkPath", directory.getAbsolutePath());
          instrumentation.data("sdkDirectoryExists", directory.exists());
        }
      } else {
        instrumentation.data("sdkPath", "--unknown--");
      }
View Full Code Here

        if (directory == null) {
          instrumentation.data("sdkDirectoryIsNull", true);
        } else {
          instrumentation.data("sdkDirectoryIsNull", false);
          instrumentation.data("sdkPath", directory.getAbsolutePath());
          instrumentation.data("sdkDirectoryExists", directory.exists());
        }
      } else {
        instrumentation.data("sdkPath", "--unknown--");
      }
      instrumentation.data("coreLibraryPath", coreLibrarySource.getFullName());
View Full Code Here

          instrumentation.data("sdkDirectoryIsNull", false);
          instrumentation.data("sdkPath", directory.getAbsolutePath());
          instrumentation.data("sdkDirectoryExists", directory.exists());
        }
      } else {
        instrumentation.data("sdkPath", "--unknown--");
      }
      instrumentation.data("coreLibraryPath", coreLibrarySource.getFullName());
    } finally {
      instrumentation.log();
    }
View Full Code Here

          instrumentation.data("sdkDirectoryExists", directory.exists());
        }
      } else {
        instrumentation.data("sdkPath", "--unknown--");
      }
      instrumentation.data("coreLibraryPath", coreLibrarySource.getFullName());
    } finally {
      instrumentation.log();
    }
    throw new AnalysisException("Could not resolve dart:core");
  }
View Full Code Here

   */
  public LibraryElement resolveLibrary(Source librarySource,
      List<ResolvableLibrary> librariesInCycle) throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("dart.engine.LibraryResolver.resolveLibrary");
    try {
      instrumentation.data("fullName", librarySource.getFullName());
      //
      // Build the map of libraries that are known.
      //
      this.librariesInCycle = librariesInCycle;
      libraryMap = buildLibraryMap();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.