Skip to content

A quick test application to review the performance of several java http libraries.

Notifications You must be signed in to change notification settings

philipgloyne/java-http-get-clients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Java HTTP GET Clients

This application was created to test the speed of three Java libraries. It repeatively calls HTTP GET requests on a specified URI and records the total laps time. As a control a vanilla client was created using the java.net package. All clients make a request and return the http response body as a String.

Clients

  • java.net Control Client (java 1.6.x)
  • Apache Commons (commons-httpclient 3.1)
  • Jersey (jersey-core 1.11)
  • RestTemplate (springframework 3.0.5-RELEASE)

Usage

java -jar [jar-one-jar.jar] [target uri] [number of requests per client]

Example usage:

java -jar target/java-http-get-clients-2.0.0.2-SNAPSHOT.one-jar.jar http://www.slashdot.org 30 

Example output:

== BEGIN ==  
Calling HTTP GET on http://www.slashdot.org 30 times  
... done  
native client takes: 2825ms  
... done  
jersey client takes: 1838ms  
... done  
apache client takes: 3724ms  
... done  
spring client takes: 1553ms  
== END ==  

About

A quick test application to review the performance of several java http libraries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages