Search in sources :

Example 1 with ComponentVisitor

use of org.sonar.server.computation.task.projectanalysis.component.ComponentVisitor in project sonarqube by SonarSource.

the class ExecuteVisitorsStep method logVisitorExecutionDurations.

private static void logVisitorExecutionDurations(List<ComponentVisitor> visitors, VisitorsCrawler visitorsCrawler) {
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("  Execution time for each component visitor:");
        Map<ComponentVisitor, Long> cumulativeDurations = visitorsCrawler.getCumulativeDurations();
        for (ComponentVisitor visitor : visitors) {
            LOGGER.debug("  - {} | time={}ms", visitor.getClass().getSimpleName(), cumulativeDurations.get(visitor));
        }
    }
}
Also used : ComponentVisitor(org.sonar.server.computation.task.projectanalysis.component.ComponentVisitor)

Example 2 with ComponentVisitor

use of org.sonar.server.computation.task.projectanalysis.component.ComponentVisitor in project sonarqube by SonarSource.

the class CloseIssuesOnRemovedComponentsVisitorTest method setUp.

@Before
public void setUp() throws Exception {
    issueCache = new IssueCache(temp.newFile(), System2.INSTANCE);
    underTest = new VisitorsCrawler(Arrays.<ComponentVisitor>asList(new CloseIssuesOnRemovedComponentsVisitor(baseIssuesLoader, componentsWithUnprocessedIssues, issueCache, issueLifecycle)));
}
Also used : ComponentVisitor(org.sonar.server.computation.task.projectanalysis.component.ComponentVisitor) VisitorsCrawler(org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler) Before(org.junit.Before)

Aggregations

ComponentVisitor (org.sonar.server.computation.task.projectanalysis.component.ComponentVisitor)2 Before (org.junit.Before)1 VisitorsCrawler (org.sonar.server.computation.task.projectanalysis.component.VisitorsCrawler)1