[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 11:50:07 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 karsten):

 Replying to [comment:20 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.

 Thanks! Those additional commits look fine!

 Regarding the placeholder comment, what we're doing there is check whether
 the line contains an IPv6 address, which by itself contains at least two
 colons whereas an IPv4 address and subsequent TCP port only contain one
 colon. Agreed that this deserves a comment. Or two, because we're doing
 that in two places.

 > 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 formatting I used is based on examples I found that are using `tidyr`,
 `dplyr`, `ggplot2`, etc. Let's look around what style guides exist for R
 and not start from what we're doing in Java. But let's do that in 2018 on
 the other ticket you opened.

 > 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?

 Should be as simple as `psql -f src/test/sql/ipv6servers/test-
 ipv6servers.sql ipv6servers`. (Untested.) Let me know if that doesn't work
 and you can't get it to work.

 What remains to be done after this? Can I prepare deployment?

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


More information about the metrics-bugs mailing list