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

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


    }
  }

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


    }
  }

  @Override
  public void setAnalysisPriorityOrder(List<Source> sources) {
    InstrumentationBuilder instrumentation = Instrumentation.builder("Analysis-setAnalysisPriorityOrder");
    checkThread(instrumentation);
    try {
      instrumentation.metric("contextId", contextId);
      basis.setAnalysisPriorityOrder(sources);
    } finally {
      instrumentation.log();
    }
  }
View Full Code Here

  }

  @Override
  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

   * Record the time the IO took if it was slow
   */
  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

    basis.addSourceInfo(source, info);
  }

  @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

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.