lombok.ast.grammar
Class ProfilerParseRunner<V>
java.lang.Object
org.parboiled.BasicParseRunner<V>
lombok.ast.grammar.ProfilerParseRunner<V>
- All Implemented Interfaces:
- org.parboiled.ParseRunner<V>
public class ProfilerParseRunner<V>
- extends org.parboiled.BasicParseRunner<V>
Like the BasicParseRunner
but will also track statistics on the parse run which you can retrieve by calling getOverviewReport()
or getExtendedReport(int)
after a parse run.
Fields inherited from class org.parboiled.BasicParseRunner |
inputBuffer, matched, parseErrors, rootContext, rootMatcher |
Methods inherited from class org.parboiled.BasicParseRunner |
createInputBuffer, run, run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProfilerParseRunner
public ProfilerParseRunner(org.parboiled.Rule rule,
String input)
runRootContext
protected boolean runRootContext()
- Overrides:
runRootContext
in class org.parboiled.BasicParseRunner<V>
runRootContext
protected boolean runRootContext(org.parboiled.MatchHandler<V> handler)
- Overrides:
runRootContext
in class org.parboiled.BasicParseRunner<V>
createRootContext
protected void createRootContext(org.parboiled.MatchHandler<V> matchHandler)
getOverviewReport
public String getOverviewReport()
- Returns a string describing, in order of 'expensiveness', the top-level failed rule chains in the parse run.
getExtendedReport
public List<String> getExtendedReport(int topEntries)
- Lists the work done by the most expensive failed rules.
First all failed rules are sorted according to how long they took, then, for each such rule,
a string is produced listing it and all its child rules. These are returned.
- Parameters:
topEntries
- Produce reports for the top topEntries
most expensive failed rules.
a negative number means: All of them.
Copyright © 2010-2011 The Project Lombok Authors, licensed under the MIT licence.