public void testSinglePageJapid() throws Exception {
final List<Post> posts = createPosts();
// execute the template
long tt = System.currentTimeMillis();
ByteArrayOutputStream baos = new ByteArrayOutputStream(10000);
Posts te = new Posts();
te.render("抬头", posts);
te = new Posts();
te.render("抬头", posts);
te = new Posts();
te.render("抬头", posts);
baos.write(te.toString().getBytes("UTF-8"));
te = new Posts();
te.render("抬头", posts);
baos.write(te.toString().getBytes("UTF-8"));
baos.write(te.toString().getBytes("UTF-8"));
for (int i = 0; i < 1000; i++) {
baos.reset();
long t = System.currentTimeMillis();
// System.out.println("run templating: " + i);
/* Merge data-model with template */
// StringWriter out = new StringWriter(1000);
// PrintWriter printWriter = new PrintWriter(out);
te = new Posts();
te.render("抬头", posts);
baos.write(te.toString().getBytes("UTF-8"));
// System.out.println(out.toString());
// out.flush();
// System.out.println(System.currentTimeMillis() - t);
// System.out.println(out.toString());
// Thread.sleep(5);