Examples of metric()


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

  @Override
  public HtmlUnit getResolvedHtmlUnit(Source htmlSource) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getResolvedHtmlUnit");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.getResolvedHtmlUnit(htmlSource);
    } finally {
      instrumentation.log(2); //Log if over 1ms
    }
  }
View Full Code Here

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

  @Override
  public SourceFactory getSourceFactory() {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-getSourceFactory");
    try {
      instrumentation.metric("contextId", contextId);
      return basis.getSourceFactory();
    } finally {
      instrumentation.log(2); //Log if over 1ms
    }
  }
View Full Code Here

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

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

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

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

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

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

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

  @Override
  public void mergeContext(AnalysisContext context) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-mergeContext");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      if (context instanceof InstrumentedAnalysisContextImpl) {
        context = ((InstrumentedAnalysisContextImpl) context).basis;
      }
      basis.mergeContext(context);
    } finally {
View Full Code Here

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

  @Override
  public CompilationUnit parseCompilationUnit(Source source) throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-parseCompilationUnit");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.parseCompilationUnit(source);
    } catch (AnalysisException e) {
      recordAnalysisException(instrumentation, e);
      throw e;
    } finally {
View Full Code Here

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

  @Override
  public HtmlUnit parseHtmlUnit(Source source) throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-parseHtmlUnit");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.parseHtmlUnit(source);
    } catch (AnalysisException e) {
      recordAnalysisException(instrumentation, e);
      throw e;
    } finally {
View Full Code Here

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

  @Override
  public AnalysisResult performAnalysisTask() {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-performAnalysisTask");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      AnalysisResult result = basis.performAnalysisTask();
      if (result.getChangeNotices() != null) {
        instrumentation.metric("ChangeNotice-count", result.getChangeNotices().length);
      }
      return result;
View Full Code Here

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

    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      AnalysisResult result = basis.performAnalysisTask();
      if (result.getChangeNotices() != null) {
        instrumentation.metric("ChangeNotice-count", result.getChangeNotices().length);
      }
      return result;
    } finally {
      instrumentation.log(15); //Log if >= 15ms
    }
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.