Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 9882 invoked from network); 21 Apr 2006 16:39:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Apr 2006 16:39:09 -0000 Received: (qmail 71672 invoked by uid 500); 21 Apr 2006 16:39:08 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 71470 invoked by uid 500); 21 Apr 2006 16:39:07 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 71404 invoked by uid 99); 21 Apr 2006 16:39:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2006 09:39:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.223.198.27] (HELO maillnx-us112.fmr.com) (192.223.198.27) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2006 09:39:05 -0700 Received: from MSGMROSM02WIN.dmn1.fmr.com (MSGMROSM02WIN.dmn1.fmr.com [172.26.31.170]) by maillnx-us112.fmr.com (Switch-3.1.2/Switch-3.1.0) with SMTP id k3LGciTs017568 for ; Fri, 21 Apr 2006 12:38:44 -0400 Received: from MSGMROIV01WIN.DMN1.FMR.COM (172.26.31.106) by MSGMROSM02WIN.dmn1.fmr.com (Sigaba Gateway v4.0) with ESMTP id 75623889; Fri, 21 Apr 2006 12:38:45 -0400 Received: from MSGMMKIM01WIN.DMN1.FMR.COM ([172.25.108.46]) by MSGMROIV01WIN.DMN1.FMR.COM with SMTP_server; Fri, 21 Apr 2006 12:38:44 -0400 Received: from msgmrocln2win.DMN1.FMR.COM ([10.37.181.15]) by MSGMMKIM01WIN.DMN1.FMR.COM with Microsoft SMTPSVC(5.0.2195.6713); Fri, 21 Apr 2006 12:38:44 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: How to measure response time with MultiThreadedHttpConnectionManager? Date: Fri, 21 Apr 2006 12:38:44 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to measure response time with MultiThreadedHttpConnectionManager? Thread-Index: AcZlYg3SBS3iJ/ZuThCaqb6iktkduQ== From: "Silvia, Don" To: X-OriginalArrivalTime: 21 Apr 2006 16:38:44.0577 (UTC) FILETIME=[0E2E8D10:01C66562] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I'm trying to measure response times in an application that uses MultiThreadedHttpConnectionManager. I tried just wrapping the call to HttpClient.executeMethod with calls to System.currentTimeMillis(): MultiThreadedHttpConnectionManager connMgr =3D new MultiThreadedHttpConnectionManager(); HttpClient client =3D new HttpClient(connMgr); ... long startTime =3D System.currentTimeMillis(); client.executeMethod(method); // method is a PostMethod long elapsed =3D System.currentTimeMillis() - startTime; But what I'm seeing is that the threads all start up and mark the start time, then the threads appear to be interrupted during executeMethod. The result is that the measured times get progressively longer, with the last thread to finish reporting a time almost as long as the entire application's run time. Is there any way to get accurate response times in a multi threaded application? =20 I'm using HttpClient 2.0.2 in my application but I tried the multi-threaded example with HttpClient 3.0 and got the same results. =20 Thanks, Don Silvia --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-user-help@jakarta.apache.org