Skip to content

Commit 66ffa50

Browse files
committed
performance refine for IOUtils.contentEquals(Reader, Reader)
1 parent cd77872 commit 66ffa50

File tree

4 files changed

+663
-48
lines changed

4 files changed

+663
-48
lines changed

pom.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,18 @@ file comparators, endian transformation classes, and much more.
230230
</contributors>
231231

232232
<dependencies>
233+
<dependency>
234+
<groupId>org.openjdk.jmh</groupId>
235+
<artifactId>jmh-core</artifactId>
236+
<version>${jmh.version}</version>
237+
<scope>test</scope>
238+
</dependency>
239+
<dependency>
240+
<groupId>org.openjdk.jmh</groupId>
241+
<artifactId>jmh-generator-annprocess</artifactId>
242+
<version>${jmh.version}</version>
243+
<scope>test</scope>
244+
</dependency>
233245
<dependency>
234246
<groupId>org.junit.jupiter</groupId>
235247
<artifactId>junit-jupiter</artifactId>
@@ -300,6 +312,7 @@ file comparators, endian transformation classes, and much more.
300312
<commons.release.isDistModule>true</commons.release.isDistModule>
301313
<commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>
302314
<commons.releaseManagerKey>86fdc7e2a11262cb</commons.releaseManagerKey>
315+
<jmh.version>1.21</jmh.version>
303316
</properties>
304317

305318
<build>
@@ -469,5 +482,44 @@ file comparators, endian transformation classes, and much more.
469482
<coveralls.skip>true</coveralls.skip>
470483
</properties>
471484
</profile>
485+
<profile>
486+
<id>benchmark</id>
487+
<properties>
488+
<skipTests>true</skipTests>
489+
<benchmark>org.apache</benchmark>
490+
</properties>
491+
<build>
492+
<plugins>
493+
<plugin>
494+
<groupId>org.codehaus.mojo</groupId>
495+
<artifactId>exec-maven-plugin</artifactId>
496+
<version>1.6.0</version>
497+
<executions>
498+
<execution>
499+
<id>benchmark</id>
500+
<phase>test</phase>
501+
<goals>
502+
<goal>exec</goal>
503+
</goals>
504+
<configuration>
505+
<classpathScope>test</classpathScope>
506+
<executable>java</executable>
507+
<arguments>
508+
<argument>-classpath</argument>
509+
<classpath/>
510+
<argument>org.openjdk.jmh.Main</argument>
511+
<argument>-rf</argument>
512+
<argument>json</argument>
513+
<argument>-rff</argument>
514+
<argument>target/jmh-result.${benchmark}.json</argument>
515+
<argument>${benchmark}</argument>
516+
</arguments>
517+
</configuration>
518+
</execution>
519+
</executions>
520+
</plugin>
521+
</plugins>
522+
</build>
523+
</profile>
472524
</profiles>
473525
</project>

0 commit comments

Comments
 (0)