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

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


  public void setChangedContents(Source source, String contents, int offset, int oldLength,
      int newLength) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-setChangedContents");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      basis.setChangedContents(source, contents, offset, oldLength, newLength);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here


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

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

    //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

  @Override
  public void applyAnalysisDelta(AnalysisDelta delta) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-updateAnalysis");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      basis.applyAnalysisDelta(delta);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

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

  @Override
  public String computeDocumentationComment(Element element) throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-computeDocumentationComment");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.computeDocumentationComment(element);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

  @Override
  public AnalysisError[] computeErrors(Source source) throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-computeErrors");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      AnalysisError[] errors = basis.computeErrors(source);
      instrumentation.metric("Errors-count", errors.length);
      return errors;
    } finally {
      instrumentation.log();
View Full Code Here

    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-computeErrors");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      AnalysisError[] errors = basis.computeErrors(source);
      instrumentation.metric("Errors-count", errors.length);
      return errors;
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

  @Override
  public HtmlElement computeHtmlElement(Source source) throws AnalysisException {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-computeHtmlElement");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      return basis.computeHtmlElement(source);
    } catch (AnalysisException e) {
      recordAnalysisException(instrumentation, e);
      throw e;
    } finally {
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.