hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: simple load tester, tips on make my http post call fast and effecient
Date Fri, 04 Oct 2013 08:23:10 GMT
On Thu, 2013-10-03 at 17:19 -0400, S Ahmed wrote:
> I want to create a simple load tester that posts a file to a service
> endpoint.
> 
> Are there any existing samples that have all the best-practices in place
> and that also does this in a group of threads?
> 
> As a starting point, can you guys critique my method that posts a file
> please.
> 
> I am creating a single instance of the client that I will pass to this
> function:
> 

You code looks all right to me. However, you should probably consider
using an exiting load tool instead of building it yourself.

For instance, HttpCore (the component kit HttpClient is based upon)
ships with a Apache Bench (AB) clone [1]. If you are familiar with the
original 'ab' [2] you will find 'httpcore-ab' pretty straight-forward .
If you want to study the source you can find it here [3] or in the
source distribution of HttpCore.

Oleg

[1]
http://hc.apache.org/httpcomponents-core-4.3.x/httpcore-ab/project-info.html
[2]
http://httpd.apache.org/docs/2.2/programs/ab.html
[3]
http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/httpcore-ab/src/main/java/org/apache/http/benchmark/


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message