Package org.sonar.core.profiling

Examples of org.sonar.core.profiling.StopWatch


    this.profiling = profiling;
  }

  @Override
  public IndicesExistsResponse get() {
    StopWatch fullProfile = profiling.start("indices exists", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here


    this.profiling = profiling;
  }

  @Override
  public CountResponse get() {
    StopWatch fullProfile = profiling.start("count", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public IndicesStatsResponse get() {
    StopWatch fullProfile = profiling.start("indices stats", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public GetResponse get() {
    StopWatch fullProfile = profiling.start("get", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.index = index;
  }

  @Override
  public CreateIndexResponse get() {
    StopWatch fullProfile = profiling.start("create index", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public BulkResponse get() {
    StopWatch fullProfile = profiling.start("bulk", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public RefreshResponse get() {
    StopWatch fullProfile = profiling.start("refresh", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public SearchResponse get() {
    StopWatch fullProfile = profiling.start("search", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
        if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public MultiGetResponse get() {
    StopWatch fullProfile = profiling.start("get", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

    this.profiling = profiling;
  }

  @Override
  public ClusterStateResponse get() {
    StopWatch fullProfile = profiling.start("cluster state", Profiling.Level.FULL);
    try {
      return super.execute().actionGet();
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to execute %s", toString()), e);
    } finally {
      if (profiling.isProfilingEnabled(Profiling.Level.BASIC)) {
        fullProfile.stop("%s", toString());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.sonar.core.profiling.StopWatch

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.