• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / commons-io / 535 / 1
88%
master: 88%

Build:
DEFAULT BRANCH: master
Ran 13 Jan 2020 07:32PM UTC
Files 152
Run time 12s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Jan 2020 06:58PM UTC coverage: 89.471% (-0.002%) from 89.473%
535.1

Pull #101

travis-ci

web-flow
Improve the performance of the contentEquals() methods.

This change modifies the contentEquals() methods to internally buffer content into a byte/char array and to then do batch comparisons of those arrays using Arrays.equals instead of using a BufferedInputStream or BufferedReader and making use of the single byte/char read() methods.

This reduces the number of method invocations by a factor equal to the buffer size and avoids casting every byte read to an int and improves performance significantly.

The following table shows the performance increase over 1000 iterations of comparing 2 1GB InputStream of binary data (stored in memory to avoid I/O).  This test was performed on an EC2 M4.4XL host using Java 1.8.0.232 and there was a forced System.gc() between each iteration to avoid GC as a source of latency:

Average: 7236 to 858ms (8.43x speedup)
P50: 7224 to 856ms (8.44x speedup)
P90: 7249 to 860ms (8.43x speedup)
P99: 7410 to 913ms (8.12x speedup)
P100: 8330 to 1278ms (6.52x speedup)

The following table shows the performance increase over 1000 iterations of comparing 2 1GB Reader of character data (stored in memory to avoid I/O).  This test was performed on an EC2 M4.4XL host using Java 1.8.0.232 and there was a forced System.gc() between each iteration to avoid GC as a source of latency:

Average: 11281 to 1737ms (6.50x speedup)
P50: 11262 to 1735ms (6.49x speedup)
P90: 11292 to 1741ms (6.49x speedup)
P99: 11707 to 1774ms (6.60x speedup)
P100: 12176 to 1884ms (6.46x speedup)
Pull Request #101: IO-649 - Improve the performance of the contentEquals() methods.

5515 of 6164 relevant lines covered (89.47%)

21506.8 hits per line

Source Files on job 535.1
  • Tree
  • List 0
  • Changed 19
  • Source Changed 1
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 370
  • Travis Job 535.1
  • 107fd25e on github
  • Prev Job for on master (#532.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc