Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAB069DD1 for ; Wed, 8 Aug 2012 14:08:27 +0000 (UTC) Received: (qmail 41660 invoked by uid 500); 8 Aug 2012 14:08:27 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 41628 invoked by uid 500); 8 Aug 2012 14:08:27 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 41618 invoked by uid 99); 8 Aug 2012 14:08:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2012 14:08:27 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.213.51] (HELO mail-yw0-f51.google.com) (209.85.213.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2012 14:08:21 +0000 Received: by yhnn12 with SMTP id n12so698016yhn.10 for ; Wed, 08 Aug 2012 07:07:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=s4SK/6XRn1hrswQdRAxKV3jQkagfydZdUG9J3dkzoZQ=; b=AS0WdpR6OBi1jw27MhV3e5AzwAsAFisB3fw/U+Na7ZBCHSueAYlLbFLPOe8FsW6hSB gsWuobnosv8/YEBtF5dQxsPSTDt/WV1A9nIUvjogL0lVtioYlr8XR7Zdd4OcaTj7iGIY AiSzg+LHNTv6O9FHaFEJJgnOCk5c6MzqPDJwkyiv4vUiQP3iFh3lSrNVzLTwcZIvk3o2 bR2HSyNqAbiFH7gA/gCU0ovgNJ3okl9OY4LH0j6uGwPeALB1jwSnhBWZL3isTEnLqLoN Ny3mj18/K9L69v6TEWOHpJ0bZXXXHYrMoO/1sgKKB3cnuQ8y+hLjMEH4u3fD1MM8OTze /v1w== MIME-Version: 1.0 Received: by 10.42.129.147 with SMTP id q19mr113513ics.43.1344434879224; Wed, 08 Aug 2012 07:07:59 -0700 (PDT) Received: by 10.64.14.196 with HTTP; Wed, 8 Aug 2012 07:07:59 -0700 (PDT) Date: Wed, 8 Aug 2012 10:07:59 -0400 Message-ID: Subject: Bandwidth usage From: Jean-Marc Spaggiari To: HttpClient User Discussion Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQknkC8LGEbVlBwi+axE5w/3Oj58Kop29cZECbGr120ScdnnW9rDzS1C3rbU7LgVgmDKg5HB X-Virus-Checked: Checked by ClamAV on apache.org Hi, Is there a good way to calculate the bandwidth used by a request? I'm doing a get and I try to track the upload and download bandwidth used. So for a get, there is some upload to the server. There is the URL, and the headers. But seems there is a bit more than that and I'm not able to figure what. When I get the respons, I'm using getHeaders("Content-Length") to get the content lenght. But I'm most probably missing the header size. I also tried EntityUtils.toString(entity).length() but none of them seems to be accurate. So I'm wondering is there is a good way to calculate the bandwidth used for upload and download? Thanks, JM --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org