Skip to content

Commit

Permalink
Updated pebble to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
mbosecke committed Mar 9, 2016
1 parent 81c222b commit 8b00e1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<jmh.version>1.11.2</jmh.version>
<uberjar.name>benchmarks</uberjar.name>

<pebble.version>1.6.0</pebble.version>
<pebble.version>2.2.0</pebble.version>
<mustache.version>0.9.1</mustache.version>
<freemarker.version>2.3.23</freemarker.version>
<velocity.version>1.7</velocity.version>
Expand Down
17 changes: 7 additions & 10 deletions src/main/java/com/mitchellbosecke/benchmark/Pebble.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package com.mitchellbosecke.benchmark;

import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;

import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Setup;

import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.error.PebbleException;
import com.mitchellbosecke.pebble.extension.escaper.EscaperExtension;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Setup;

import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;

public class Pebble extends BaseBenchmark {

Expand All @@ -20,8 +18,7 @@ public class Pebble extends BaseBenchmark {

@Setup
public void setup() throws PebbleException {
PebbleEngine engine = new PebbleEngine();
engine.getExtension(EscaperExtension.class).setAutoEscaping(false);
PebbleEngine engine = new PebbleEngine.Builder().autoEscaping(false).build();
template = engine.getTemplate("templates/stocks.pebble.html");
this.context = getContext();
}
Expand Down

0 comments on commit 8b00e1f

Please sign in to comment.