use of org.sonar.api.utils.log.Profiler in project sonarqube by SonarSource.
the class ServerIssueRepository method load.
public void load() {
Profiler profiler = Profiler.create(LOG).startInfo(LOG_MSG);
this.issuesCache = caches.createCache("previousIssues");
caches.registerValueCoder(ServerIssue.class, new ServerIssueValueCoder());
previousIssuesLoader.load(reactor.getRoot().getKeyWithBranch(), new SaveIssueConsumer());
profiler.stopInfo();
}
use of org.sonar.api.utils.log.Profiler in project sonarqube by SonarSource.
the class ScannerPluginInstaller method loadPlugins.
private Map<String, PluginInfo> loadPlugins(List<RemotePlugin> remotePlugins) {
Map<String, PluginInfo> infosByKey = new HashMap<>(remotePlugins.size());
Profiler profiler = Profiler.create(LOG).startDebug("Load plugins");
for (RemotePlugin remotePlugin : remotePlugins) {
if (pluginPredicate.apply(remotePlugin.getKey())) {
File jarFile = download(remotePlugin);
PluginInfo info = PluginInfo.create(jarFile);
infosByKey.put(info.getKey(), info);
}
}
profiler.stopDebug();
return infosByKey;
}
use of org.sonar.api.utils.log.Profiler in project sonarqube by SonarSource.
the class RulesProvider method load.
private static Rules load(RulesLoader ref) {
Profiler profiler = Profiler.create(LOG).startInfo(LOG_MSG);
List<Rule> loadedRules = ref.load();
RulesBuilder builder = new RulesBuilder();
for (Rule r : loadedRules) {
NewRule newRule = builder.add(RuleKey.of(r.getRepository(), r.getKey()));
newRule.setName(r.getName());
newRule.setInternalKey(r.getInternalKey());
}
profiler.stopInfo();
return builder.build();
}
use of org.sonar.api.utils.log.Profiler in project sonarqube by SonarSource.
the class ProjectBuildersExecutor method execute.
public void execute(ProjectReactor reactor) {
if (projectBuilders.length > 0) {
Profiler profiler = Profiler.create(LOG).startInfo("Execute project builders");
ProjectBuilderContext context = new ProjectBuilderContext(reactor);
for (ProjectBuilder projectBuilder : projectBuilders) {
try {
projectBuilder.build(context);
} catch (Exception e) {
throw MessageException.of("Failed to execute project builder: " + getDescription(projectBuilder), e);
}
}
profiler.stopInfo();
}
}
use of org.sonar.api.utils.log.Profiler in project sonarqube by SonarSource.
the class ProjectReactorBuilder method execute.
public ProjectReactor execute() {
Profiler profiler = Profiler.create(LOG).startInfo("Process project properties");
new DroppedPropertyChecker(analysisProps.properties(), DROPPED_PROPERTIES).checkDroppedProperties();
Map<String, Map<String, String>> propertiesByModuleIdPath = new HashMap<>();
extractPropertiesByModule(propertiesByModuleIdPath, "", "", analysisProps.properties());
ProjectDefinition rootProject = defineRootProject(propertiesByModuleIdPath.get(""), null);
rootProjectWorkDir = rootProject.getWorkDir();
defineChildren(rootProject, propertiesByModuleIdPath, "");
cleanAndCheckProjectDefinitions(rootProject);
// Since task properties are now empty we should add root module properties
analysisProps.properties().putAll(propertiesByModuleIdPath.get(""));
profiler.stopDebug();
return new ProjectReactor(rootProject);
}
Aggregations