System.out.println(
" VarZ:" + getClass().getName() + ".msPerRun=" + microsPerRun);
}
private int benchmark(int nRuns) throws IOException, ParseException {
CharProducer testInput = fromResource("amazon.com.html");
InputSource is = testInput.getSourceBreaks(0).source();
MessageQueue mq = DevNullMessageQueue.singleton();
long t0 = System.nanoTime();
for (int i = nRuns; --i >= 0;) {
HtmlLexer lexer = new HtmlLexer(testInput.clone());
lexer.setTreatedAsXml(false);
TokenQueue<HtmlTokenType> tq = new TokenQueue<HtmlTokenType>(
lexer, is, DomParser.SKIP_COMMENTS);
DomParser p = new DomParser(tq, false, mq);
p.setNeedsDebugData(false);