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

Examples of com.google.dart.engine.utilities.instrumentation.InstrumentationBuilder


    }
  }

  @Override
  public HtmlElement getHtmlElement(Source source) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getHtmlElement");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.getHtmlElement(source);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here


   * @param newState the new state of the content
   * @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

    }
  }

  @Override
  public Source[] getHtmlFilesReferencing(Source source) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getHtmlFilesReferencing");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      Source[] ret = basis.getHtmlFilesReferencing(source);
      if (ret != null) {
        instrumentation.metric("Source-count", ret.length);
      }
      return ret;
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

    }
  }

  @Override
  public Source[] getHtmlSources() {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getHtmlSources");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      Source[] ret = basis.getHtmlSources();
      if (ret != null) {
        instrumentation.metric("Source-count", ret.length);
      }
      return ret;
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

    }
  }

  @Override
  public SourceKind getKindOf(Source source) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getKindOf");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.getKindOf(source);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

    }
  }

  @Override
  public Source[] getLaunchableClientLibrarySources() {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getLaunchableClientLibrarySources");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      Source[] ret = basis.getLaunchableClientLibrarySources();
      if (ret != null) {
        instrumentation.metric("Source-count", ret.length);
      }
      return ret;
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

    }
  }

  @Override
  public Source[] getLaunchableServerLibrarySources() {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getLaunchableServerLibrarySources");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      Source[] ret = basis.getLaunchableServerLibrarySources();
      if (ret != null) {
        instrumentation.metric("Source-count", ret.length);
      }
      return ret;
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

    }
  }

  @Override
  public Source[] getLibrariesContaining(Source source) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getLibrariesContaining");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      Source[] ret = basis.getLibrariesContaining(source);
      if (ret != null) {
        instrumentation.metric("Source-count", ret.length);
      }
      return ret;
    } finally {
      instrumentation.log(2); //Log if 1ms
    }
  }
View Full Code Here

    }
  }

  @Override
  public Source[] getLibrariesDependingOn(Source librarySource) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getLibrariesDependingOn");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      Source[] ret = basis.getLibrariesDependingOn(librarySource);
      if (ret != null) {
        instrumentation.metric("Source-count", ret.length);
      }
      return ret;
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

    }
  }

  @Override
  public Source[] getLibrariesReferencedFromHtml(Source htmlSource) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getLibrariesReferencedFromHtml");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.getLibrariesReferencedFromHtml(htmlSource);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.utilities.instrumentation.InstrumentationBuilder

Copyright © 2018 www.massapicom. 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.