-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a54e1b
commit 8df0840
Showing
3 changed files
with
164 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# use glob syntax. | ||
syntax: glob | ||
*.class | ||
*~ | ||
*.bak | ||
*.off | ||
*.old | ||
.DS_Store | ||
jmh.out | ||
|
||
# building | ||
target | ||
|
||
# Eclipse | ||
.classpath | ||
.project | ||
.settings | ||
|
||
# IDEA | ||
.idea | ||
*.iml | ||
*.ipr | ||
*.iws | ||
/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
# json-performance-benchmarks | ||
Collection of jmh-based benchmarks that compare performance Java JSON libraries for reading, writing | ||
# Overview | ||
|
||
This project contains a set of performance micro-benchmarks, based on excellent | ||
[JMH](http://openjdk.java.net/projects/code-tools/jmh/) package. | ||
Benchmarks exercise JSON reading and/or writing performance of a few popular Java JSON libraries: | ||
|
||
* [https://github.com/FasterXML/jackson](Jackson) | ||
* [https://github.com/google/gson](GSON) | ||
|
||
# Status | ||
|
||
Somewhat experimental. But has been used with success in optimizing Jackson 2.4 release! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.fasterxml</groupId> | ||
<artifactId>oss-parent</artifactId> | ||
<version>20</version> | ||
</parent> | ||
|
||
<artifactId>java-json-performance</artifactId> | ||
<version>0.5.0-SNAPSHOT</version> | ||
<name>Java JSON Performance Benchmarks</name> | ||
<packaging>jar</packaging> | ||
|
||
<description>A suite of JMH-based micro-benchmarks used for Java JSON library performance comparison | ||
</description> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
|
||
<version.jackson.annotations>2.6.0</version.jackson.annotations> | ||
<version.jackson>2.6.0</version.jackson> | ||
<version.gson>2.3.1</version.gson> | ||
|
||
<version.jmh>1.9.3</version.jmh> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-core</artifactId> | ||
<version>${version.jmh}</version> | ||
</dependency> | ||
|
||
<!-- As per [http://stackoverflow.com/questions/23891586/jmh-not-working-in-eclipse-as-maven-project-no-benchmarks-to-run] | ||
we need another dep | ||
--> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-generator-annprocess</artifactId> | ||
<version>${version.jmh}</version> | ||
<!-- the processor artifact is required only during compilation and | ||
does not need to be transitive, hence provided scope | ||
--> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- First, Jackson deps --> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
<version>${version.jackson.annotations}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>${version.jackson}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>${version.jackson}</version> | ||
</dependency> | ||
|
||
<!-- may want to test Afterburner-enabled Jackson? --> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.module</groupId> | ||
<artifactId>jackson-module-afterburner</artifactId> | ||
<version>${version.jackson}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.jr</groupId> | ||
<artifactId>jackson-jr-objects</artifactId> | ||
<version>${version.jackson}</version> | ||
</dependency> | ||
|
||
<!-- and GSON --> | ||
|
||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>2.3.1</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.1</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
<showDeprecation>true</showDeprecation> | ||
<showWarnings>true</showWarnings> | ||
<optimize>true</optimize> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>2.0</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>microbenchmarks</finalName> | ||
<transformers> | ||
<transformer | ||
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>org.openjdk.jmh.Main</mainClass> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |