Package japidviews.templates

Examples of japidviews.templates.AllPost


  @Test
  public void testJapid() throws InterruptedException {
    List<Post> posts = createPosts();
    // AllPost te = new AllPost(new
    // org.apache.commons.io.output.ByteArrayOutputStream());
    AllPost te = new AllPost(new StringBuilder(8000));
    long t = System.currentTimeMillis();
    long tt = System.currentTimeMillis();
    for (int i = 0; i < 100; i++) {
      // System.out.println("run templating: " + i);
      // StringWriter out = new StringWriter(1000);
      // PrintWriter printWriter = new PrintWriter(out);
      te = new AllPost(new StringBuilder(1000));
      t = System.currentTimeMillis();
      te.render("抬头", posts);
      System.out.println(System.currentTimeMillis() - t);
      // System.out.println(out.toString());
      // Thread.sleep(5);
    }
    System.out.println("total time: " + (System.currentTimeMillis() - tt));
View Full Code Here


    for (int i = 0; i < 5; i++) {
      posts.add(p);
    }

    long t = System.currentTimeMillis();
    RenderResult r = new AllPost().render("抬头", posts);
    System.out.println(System.currentTimeMillis() - t);
    System.out.println(r.getContent().toString());
  }
View Full Code Here

  @Test
  public void testJapid() throws InterruptedException {
    List<Post> posts = createPosts();
    // AllPost te = new AllPost(new
    // org.apache.commons.io.output.ByteArrayOutputStream());
    AllPost te = new AllPost(new StringBuilder(8000));
    long t = System.currentTimeMillis();
    long tt = System.currentTimeMillis();
    for (int i = 0; i < 100; i++) {
      // System.out.println("run templating: " + i);
      // StringWriter out = new StringWriter(1000);
      // PrintWriter printWriter = new PrintWriter(out);
      te = new AllPost(new StringBuilder(1000));
      t = System.currentTimeMillis();
      te.render("抬头", posts);
      System.out.println(System.currentTimeMillis() - t);
      // System.out.println(out.toString());
      // Thread.sleep(5);
    }
    System.out.println("total time: " + (System.currentTimeMillis() - tt));
View Full Code Here

    for (int i = 0; i < 5; i++) {
      posts.add(p);
    }

    long t = System.currentTimeMillis();
    RenderResult r = new AllPost(null).render("抬头", posts);
    System.out.println(System.currentTimeMillis() - t);
    System.out.println(r.getContent().toString());
  }
View Full Code Here

TOP

Related Classes of japidviews.templates.AllPost

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.