[tor-bugs] #19755 [Metrics/CollecTor]: improve code quality of bridgedescs module

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jul 29 13:04:24 UTC 2016


#19755: improve code quality of bridgedescs module
-------------------------------+---------------------------------
 Reporter:  iwakeh             |          Owner:  iwakeh
     Type:  enhancement        |         Status:  needs_review
 Priority:  Medium             |      Milestone:  CollecTor 1.1.0
Component:  Metrics/CollecTor  |        Version:
 Severity:  Normal             |     Resolution:
 Keywords:                     |  Actual Points:
Parent ID:                     |         Points:
 Reviewer:                     |        Sponsor:
-------------------------------+---------------------------------

Comment (by karsten):

 Replying to [comment:9 iwakeh]:
 > I attached a patch simplifying the configuration setting.

 Oh, that looks indeed simpler.  Thanks, will apply that.

 > It would be good to create methods for the various list manipulations
 instead of the repeated loops over the descriptor line lists (i.e. more
 readable and shorter class file in total).

 Agreed.  That's what I meant by providing even more non-test methods and
 helper classes that will in turn simplify the actual test methods.  Will
 simplify things there.

 > And, some helper classes instead of private inner classes TarballBuilder
 and the different *DescriptorBuilders would make the test class a little
 shorter.

 Not so sure about this one.  The advantage of making them inner classes is
 that they can access the outer classes' attributes.  Making them separate
 classes would lead to even more code overall.  But let's see how things
 evolve.

 > I'm sort of wondering if the supply of the tests descriptor tars should
 be more direct? But that's a bigger change in this huge test class.

 Can you be more specific what change you have in mind there?

 Thanks!

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


More information about the tor-bugs mailing list