forked from phoedos/pmd
Prevent double counting time
- First off, all LPS are benchmarked in the AstProcessor, having this here was inconsistent - Since these passes can be triggered by the symbol table LPS phase, we ended up double counting total time. - This however puts all disambiguation passes done for symbol table as symbol table cost, which although accurate, may not help to identify speed up opportunities as clearly, but the benchmark is not a profiling tool.
This commit is contained in:
@ -12,7 +12,6 @@ import java.util.Iterator;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import net.sourceforge.pmd.benchmark.TimeTracker;
|
||||
import net.sourceforge.pmd.lang.ast.Node;
|
||||
import net.sourceforge.pmd.lang.ast.NodeStream;
|
||||
import net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken;
|
||||
@ -56,7 +55,7 @@ final class AstDisambiguationPass {
|
||||
*/
|
||||
public static void disambigWithCtx(NodeStream<? extends JavaNode> nodes, ReferenceCtx ctx) {
|
||||
assert ctx != null : "Null context";
|
||||
TimeTracker.bench("AST disambiguation", () -> nodes.forEach(it -> it.acceptVisitor(DisambigVisitor.INSTANCE, ctx)));
|
||||
nodes.forEach(it -> it.acceptVisitor(DisambigVisitor.INSTANCE, ctx));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user