Lombok.ast - v0.2

lombok.ast.grammar
Class ProfilerParseRunner<V>

java.lang.Object
  extended by org.parboiled.BasicParseRunner<V>
      extended by 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.


Nested Class Summary
 class ProfilerParseRunner.Handler
           
 
Field Summary
 
Fields inherited from class org.parboiled.BasicParseRunner
inputBuffer, matched, parseErrors, rootContext, rootMatcher
 
Constructor Summary
ProfilerParseRunner(org.parboiled.Rule rule, String input)
           
 
Method Summary
protected  void createRootContext(org.parboiled.MatchHandler<V> matchHandler)
           
 List<String> getExtendedReport(int topEntries)
          Lists the work done by the most expensive failed rules.
 String getOverviewReport()
          Returns a string describing, in order of 'expensiveness', the top-level failed rule chains in the parse run.
protected  boolean runRootContext()
           
protected  boolean runRootContext(org.parboiled.MatchHandler<V> handler)
           
 
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
 

Constructor Detail

ProfilerParseRunner

public ProfilerParseRunner(org.parboiled.Rule rule,
                           String input)
Method Detail

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.

Lombok.ast - v0.2

Copyright © 2010-2011 The Project Lombok Authors, licensed under the MIT licence.