[metrics-bugs] #24218 [Metrics/Statistics]: Implement new metrics-web module for IPv6 relay statistics

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Dec 22 10:04:12 UTC 2017


#24218: Implement new metrics-web module for IPv6 relay statistics
--------------------------------+------------------------------
 Reporter:  karsten             |          Owner:  metrics-team
     Type:  enhancement         |         Status:  needs_review
 Priority:  Medium              |      Milestone:
Component:  Metrics/Statistics  |        Version:
 Severity:  Normal              |     Resolution:
 Keywords:                      |  Actual Points:
Parent ID:                      |         Points:
 Reviewer:  iwakeh              |        Sponsor:
--------------------------------+------------------------------

Comment (by iwakeh):

 Please find the refactored branch and some additional commits on
 [https://gitweb.torproject.org/user/iwakeh/metrics-
 web.git/log/?h=tasks-24218-23761-2 my tasks-24218-23761-2 branch].  There
 is one [https://gitweb.torproject.org/user/iwakeh/metrics-
 web.git/commit/?h=tasks-24218-23761-2&id=71003a5e8ca2c7b40aec573f8ccbe611d52eca0c
 placeholder commit], where a comment explaining the reasoning would be
 nice and I couldn't come up with a nice comment myself.  I hope, all
 commit comments are self-explanatory.

 Regarding R code style I'd suggest breaking lines before operators as we
 do in Java.  It makes the code more readable when the beginning of an
 indented line indicates what happens.  For example:
 {{{
 all_relay_data
     %>% filter(valid_after_date >= start_date, valid_after_date <=
 end_date)
     %>% group_by(valid_after_date)
     %>% summarize(total = sum(server_count_sum_avg),
         announced = sum(server_count_sum_avg[announced_ipv6 == 't']),
         reachable = sum(server_count_sum_avg[reachable_ipv6_relay ==
 't']),
         exiting = sum(server_count_sum_avg[exiting_ipv6_relay == 't']))
     %>% merge(data.frame(valid_after_date = seq(start_date, end_date,
         by = "1 day")), all = TRUE)...
 }}}

 Here the beginning of a next pipe step is clearly visible and
 distinguishable from the continuation of a parameter listing.

 The SQL script now works ok with my 9.6 postgres installation (I forgot to
 upgrade my cluster after the 9.6 installation, which is not done
 automatically).

 Could you post the command for running the pgTap sql tests, so I can
 create the corresponding ant task w/o experimenting too much?

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


More information about the metrics-bugs mailing list