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: [email protected] For additional commands, e-mail: [email protected]
