Package org.sonar.api.utils

Examples of org.sonar.api.utils.TimeProfiler.stop()


    if (projectReferentials == null) {
      TimeProfiler profiler = new TimeProfiler(LOG).start("Load project referentials");
      try {
        projectReferentials = loader.load(reactor, taskProps);
      } finally {
        profiler.stop();
      }
    }
    return projectReferentials;
  }
}
View Full Code Here


    if (globalReferentials == null) {
      TimeProfiler profiler = new TimeProfiler(LOG).start("Load global referentials");
      try {
        globalReferentials = loader.load();
      } finally {
        profiler.stop();
      }
    }
    return globalReferentials;
  }
}
View Full Code Here

  public Rules provide(RuleDao ruleDao, DebtModel debtModel, Durations durations) {
    if (singleton == null) {
      TimeProfiler profiler = new TimeProfiler(LOG).start("Loading rules");
      singleton = load(ruleDao, (DefaultDebtModel) debtModel, durations);
      profiler.stop();
    }
    return singleton;
  }

  private Rules load(RuleDao ruleDao, DefaultDebtModel debtModel, Durations durations) {
View Full Code Here

      LOG.info("SCM provider for this project is: " + configuration.provider().key());
      TimeProfiler profiler = new TimeProfiler().start("Retrieve SCM blame information");
      DefaultBlameOutput output = new DefaultBlameOutput(context, filesToBlame);
      configuration.provider().blameCommand().blame(new DefaultBlameInput(fs, filesToBlame), output);
      output.finish();
      profiler.stop();
    }
  }

  private void copyPreviousMeasuresForUnmodifiedFiles(final SensorContext context, List<InputFile> filesToBlame, InputFile f) {
    FileData fileData = projectReferentials.fileData(projectDefinition.getKeyWithBranch(), f.relativePath());
View Full Code Here

      eventBus.fireEvent(new InitializerExecutionEvent(initializer, true));
      executeMavenPlugin(initializer);

      TimeProfiler profiler = new TimeProfiler(LOG).start("Initializer " + initializer);
      initializer.execute(project);
      profiler.stop();
      eventBus.fireEvent(new InitializerExecutionEvent(initializer, false));
    }

    eventBus.fireEvent(new InitializersPhaseEvent(Lists.newArrayList(initializers), false));
  }
View Full Code Here

    if (sensor instanceof DependsUponMavenPlugin) {
      MavenPluginHandler handler = ((DependsUponMavenPlugin) sensor).getMavenPluginHandler(project);
      if (handler != null) {
        TimeProfiler profiler = new TimeProfiler(LOG).start("Execute maven plugin " + handler.getArtifactId());
        mavenExecutor.execute(project, fs, handler);
        profiler.stop();
      }
    }
  }

}
View Full Code Here

      if (he.getResponseCode() == 404) {
        return "";
      }
      throw he;
    } finally {
      profiler.stop();
    }
  }

  @CheckForNull
  private String loadSourceFromDb(Resource resource) {
View Full Code Here

  public DebtModel provide(CharacteristicDao dao) {
    if (model == null) {
      TimeProfiler profiler = new TimeProfiler(LOG).start("Loading technical debt model");
      model = load(dao);
      profiler.stop();
    }
    return model;
  }

  private DebtModel load(CharacteristicDao dao) {
View Full Code Here

      } catch (Exception e) {
        throw new SonarException("Unable to execute maven plugin", e);
      } finally {
        // Reset original ClassLoader that may have been changed during Maven Execution (see SONAR-1800)
        Thread.currentThread().setContextClassLoader(currentClassLoader);
        profiler.stop();
      }
      if (!fs.isInitialized()) {
        pomConverter.synchronizeFileSystem(project.getPom(), fs);
      }
    }
View Full Code Here

    if (sensor instanceof DependsUponMavenPlugin) {
      MavenPluginHandler handler = ((DependsUponMavenPlugin) sensor).getMavenPluginHandler(module);
      if (handler != null) {
        TimeProfiler profiler = new TimeProfiler(LOG).start("Execute maven plugin " + handler.getArtifactId());
        mavenExecutor.execute(module, fs, handler);
        profiler.stop();
      }
    }
  }
}
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.