Delivery-Date: Sat, 16 Aug 2014 03:00:38 -0400
Return-Path: <tor-talk-bounces@lists.torproject.org>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on moria.seul.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=ham version=3.3.1
X-Original-To: archiver@seul.org
Delivered-To: archiver@seul.org
Received: from eugeni.torproject.org (eugeni.torproject.org [38.229.72.13])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by khazad-dum.seul.org (Postfix) with ESMTPS id 31C801E0E88;
	Sat, 16 Aug 2014 03:00:36 -0400 (EDT)
Received: from eugeni.torproject.org (localhost [127.0.0.1])
	by eugeni.torproject.org (Postfix) with ESMTP id 5C6E530BD3;
	Sat, 16 Aug 2014 07:00:31 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by eugeni.torproject.org (Postfix) with ESMTP id A162830BFB
 for <tor-talk@lists.torproject.org>; Sat, 16 Aug 2014 07:00:27 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at eugeni.torproject.org
Received: from eugeni.torproject.org ([127.0.0.1])
 by localhost (eugeni.torproject.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id nHVPc5ryL1jf for <tor-talk@lists.torproject.org>;
 Sat, 16 Aug 2014 07:00:27 +0000 (UTC)
Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com
 [IPv6:2a00:1450:400c:c05::22b])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (not verified))
 by eugeni.torproject.org (Postfix) with ESMTPS id 4D5EE30A88
 for <tor-talk@lists.torproject.org>; Sat, 16 Aug 2014 07:00:27 +0000 (UTC)
Received: by mail-wi0-f171.google.com with SMTP id hi2so1637372wib.10
 for <tor-talk@lists.torproject.org>; Sat, 16 Aug 2014 00:00:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:message-id:date:from:user-agent:mime-version:to:subject
 :references:in-reply-to:content-type:content-transfer-encoding;
 bh=xeBayAk8TL6jSiTC5tRRBm++g9P+dLANcFezu8u/8/A=;
 b=NccM1A3RLsvcfskQfjLXb66MNldBE8+hoBYmLpCio5RvDNrPT57+PL4HiunB+6kUT/
 Og3tuZRZw9V6lQeYZL5yhNXDDr21fDLwaQK5mwHh/m0SJqUcfNNHnt8utDgfyUsBZ1Sa
 xxSvp1OGv4pVzNTBMU2uyWAK5Ga+FVF8gmVbkRm2kNubA8mJYKkY6Cnw8qqA9zxmA1F6
 6aepfIRFi+U5CLezHbqtAk7qojtWJ/PvwuWfleN6ccukJw9JCN8T0/vRuPd0bZlAbzeM
 R8/nHRBsD+LxMGDQywEK9vtDKEqdegQaSTPkWCEBPIRUjSTEVsj3WgLFe/qmsiXFslk3
 IZEQ==
X-Received: by 10.180.206.38 with SMTP id ll6mr26528694wic.40.1408172424358;
 Sat, 16 Aug 2014 00:00:24 -0700 (PDT)
Received: from karstens-air.multi.box
 (dyndsl-031-150-238-037.ewe-ip-backbone.de. [31.150.238.37])
 by mx.google.com with ESMTPSA id wr6sm24439572wjc.24.2014.08.16.00.00.22
 for <multiple recipients>
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Sat, 16 Aug 2014 00:00:23 -0700 (PDT)
Message-ID: <53EF0184.2010705@torproject.org>
Date: Sat, 16 Aug 2014 09:00:20 +0200
From: Karsten Loesing <karsten@torproject.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9;
 rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: tor-talk@lists.torproject.org
References: <CADop2NGhrkmZ8SW96g84=VZjtdK6V1pkz6-3D0CJNWaaB6yxmw@mail.gmail.com>
In-Reply-To: <CADop2NGhrkmZ8SW96g84=VZjtdK6V1pkz6-3D0CJNWaaB6yxmw@mail.gmail.com>
Subject: Re: [tor-talk] computing the Tor Metric's "advertised bandwidth"
 and "read bandwidth" from the archived Tor consensus
X-BeenThere: tor-talk@lists.torproject.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: tor-talk@lists.torproject.org
List-Id: "all discussion about theory, design,
 and development of Onion Routing" <tor-talk.lists.torproject.org>
List-Unsubscribe: <https://lists.torproject.org/cgi-bin/mailman/options/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=unsubscribe>
List-Archive: <http://lists.torproject.org/pipermail/tor-talk/>
List-Post: <mailto:tor-talk@lists.torproject.org>
List-Help: <mailto:tor-talk-request@lists.torproject.org?subject=help>
List-Subscribe: <https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: tor-talk-bounces@lists.torproject.org
Sender: "tor-talk" <tor-talk-bounces@lists.torproject.org>

On 15/08/14 00:22, Virgil Griffith wrote:
> I've been parsing the historical collecTor consensus files using the Stem
> library.  I want to be able to recreate the existing numbers before I delve
> into new stuff, so I am attempting to recreate some datapoints from the
> Metrics site.
> 
> The "router status entries", queried by:
> *
> https://stem.torproject.org/api/descriptor/router_status_entry.html#stem.descriptor.router_status_entry.RouterStatusEntryV3
> 
> has a "bandwidth" and "measured" entry.  But, it remains unclear to me how
> to derive the "bandwidth history" on:
> * https://metrics.torproject.org/bandwidth.html
> 
> I presume the "bandwidth claimed" in the RouterStatus descriptor is
> synonymous with the "advertised bandwidth" on Metrics.  However, the
> "measured" entry in the RouterStatus descriptor has been blank for every
> file I tried.  Therefore it's unclear to me how to compute the "bandwidth
> history" line on Metrics.
> 
> Any enlightenment here?

The various bandwidth numbers in Tor descriptors are all but
self-explanatory.  Presuming things will almost always lead you in the
wrong direction.  That's also the case here.

I suggest you start by reading the relevant parts in dir-spec.txt
(search for bandwidth):

https://gitweb.torproject.org/torspec.git/blob/HEAD:/dir-spec.txt

Short answer: the bandwidth history graphs are based on the bandwidth
histories contained in extra-info descriptors.  Search for
"read-history" and "write-history" in dir.spec.txt.

All the best,
Karsten

-- 
tor-talk mailing list - tor-talk@lists.torproject.org
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk

