Search in sources :

Example 56 with Profiler

use of org.sonar.api.utils.log.Profiler in project sonarqube by SonarSource.

the class ProjectBranchesProvider method provide.

@Bean("ProjectBranches")
public ProjectBranches provide(@Nullable ProjectBranchesLoader loader, ScannerProperties scannerProperties) {
    if (loader == null) {
        return new ProjectBranches(Collections.emptyList());
    }
    Profiler profiler = Profiler.create(LOG).startInfo(LOG_MSG);
    ProjectBranches branches = loader.load(scannerProperties.getProjectKey());
    profiler.stopInfo();
    return branches;
}
Also used : Profiler(org.sonar.api.utils.log.Profiler) Bean(org.springframework.context.annotation.Bean)

Aggregations

Profiler (org.sonar.api.utils.log.Profiler)56 Bean (org.springframework.context.annotation.Bean)7 HashMap (java.util.HashMap)6 IOException (java.io.IOException)5 DbSession (org.sonar.db.DbSession)5 GetRequest (org.sonarqube.ws.client.GetRequest)5 File (java.io.File)3 Reader (java.io.Reader)3 RulesDefinition (org.sonar.api.server.rule.RulesDefinition)3 InputStream (java.io.InputStream)2 Path (java.nio.file.Path)2 LinkedHashMap (java.util.LinkedHashMap)2 Map (java.util.Map)2 CheckForNull (javax.annotation.CheckForNull)2 OptInCaching (org.picocontainer.behaviors.OptInCaching)2 ReflectionLifecycleStrategy (org.picocontainer.lifecycle.ReflectionLifecycleStrategy)2 NullComponentMonitor (org.picocontainer.monitors.NullComponentMonitor)2 InputFile (org.sonar.api.batch.fs.InputFile)2 NewRule (org.sonar.api.batch.rule.internal.NewRule)2 RulesBuilder (org.sonar.api.batch.rule.internal.RulesBuilder)2