[tor-bugs] #3338 [Analysis]: Why do our user graphs have these huge spikes?

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Jun 24 04:14:02 UTC 2011


#3338: Why do our user graphs have these huge spikes?
----------------------+-----------------------------------------------------
 Reporter:  arma      |          Owner:     
     Type:  task      |         Status:  new
 Priority:  normal    |      Milestone:     
Component:  Analysis  |        Version:     
 Keywords:            |         Parent:     
   Points:            |   Actualpoints:     
----------------------+-----------------------------------------------------

Comment(by arma):

 For posterity, here were my hacks.

 For master:
 {{{
 diff --git a/src/or/routerlist.c b/src/or/routerlist.c
 index f711282..b304255 100644
 --- a/src/or/routerlist.c
 +++ b/src/or/routerlist.c
 @@ -1812,6 +1812,10 @@
 smartlist_choose_node_by_bandwidth_weights(smartlist_t *s
      weighted_bw += weight*this_bw;
      if (is_me)
        sl_last_weighted_bw_of_me = weight*this_bw;
 +    if (rule == WEIGHT_FOR_DIR)
 +      log_debug(LD_CIRC, "Foo: %lf %s",
 +                weight*this_bw,
 +                node_get_nickname(node));
    } SMARTLIST_FOREACH_END(node);

    /* XXXX023 this is a kludge to expose these values. */
 }}}

 and for maint-0.2.1:
 {{{
 diff --git a/src/or/routerlist.c b/src/or/routerlist.c
 index be7ba0e..32588e9 100644
 --- a/src/or/routerlist.c
 +++ b/src/or/routerlist.c
 @@ -1593,6 +1593,7 @@ smartlist_choose_by_bandwidth(smartlist_t *sl,
 bandwidth_w
        is_guard = status->is_possible_guard;
        if (status->has_bandwidth) {
          this_bw = kb_to_bytes(status->bandwidth);
 +        log_debug(LD_CIRC, "Foo1: %d %d %s", this_bw, i,
 status->nickname);
        } else { /* guess */
          /* XXX022 once consensuses always list bandwidths, we can take
           * this guessing business out. -RD */
 @@ -1724,6 +1725,8 @@ smartlist_choose_by_bandwidth(smartlist_t *sl,
 bandwidth_w
        total_bw += bw;
        if (i == (unsigned) me_idx)
          sl_last_weighted_bw_of_me = bw;
 +      if (statuses)
 +        log_debug(LD_CIRC, "Foo2: %d %d %d", bandwidths[i], bw, i);
      }
    }
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3338#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list