public void testComplexBench() throws MustacheException, IOException {
if (skip()) return;
System.out.println("complex.html evaluations per millisecond:");
for (int i = 0; i < 3; i++) {
{
DefaultMustacheFactory cf = new DefaultMustacheFactory();
cf.setObjectHandler(new JRubyObjectHandler());
Mustache m = cf.compile("complex.html");
Object context = makeComplex();
assertEquals(getContents(root, "complex.txt"), complextest(m, context).toString());
long start = System.currentTimeMillis();
int total = 0;
while (true) {
complextest(m, context);
total++;
if (System.currentTimeMillis() - start > TIME) break;
}
System.out.println("Ruby: " + total / TIME);
}
{
DefaultMustacheFactory cf = new DefaultMustacheFactory();
Mustache m = cf.compile("complex.html");
Object context = new ComplexObject();
assertEquals(getContents(root, "complex.txt"), complextest(m, context).toString());
long start = System.currentTimeMillis();
int total = 0;
while (true) {