public void testPerformance(byte[] request, String path) throws Exception {
long start = System.currentTimeMillis();
for(int i = 0; i < 10000; i++) {
RequestConsumer header = new RequestConsumer();
Cursor cursor = new StreamCursor(request);
while(!header.isFinished()) {
header.consume(cursor);
}
assertEquals(cursor.ready(), -1);
assertEquals(header.getPath().getPath(), path);
}
System.err.printf("%s time=%s%n", path, (System.currentTimeMillis() - start));
}