[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #22279 [Metrics/metrics-lib]: simplify and avoid repetition in ParserHelper methods



#22279: simplify and avoid repetition in ParserHelper methods
---------------------------------+-----------------------------------
 Reporter:  iwakeh               |          Owner:  karsten
     Type:  enhancement          |         Status:  needs_review
 Priority:  Medium               |      Milestone:  metrics-lib 1.8.0
Component:  Metrics/metrics-lib  |        Version:
 Severity:  Normal               |     Resolution:
 Keywords:                       |  Actual Points:
Parent ID:                       |         Points:
 Reviewer:                       |        Sponsor:
---------------------------------+-----------------------------------

Comment (by iwakeh):

 Replying to [comment:11 karsten]:
 > We'll have to represent the case of an empty key-value list somehow.
 For example `"dirreq-v2-reqs "` contains zero key-value elements, which we
 want to represent somehow.  And it's different from an omitted
 `dirreq-v2-reqs` line.  I mean, we could imagine doing this differently in
 the future, but I tried to leave the current behavior unchanged for now.
 What did you have in mind here?

 Ah, that makes sense.  I just wanted to know a real data example for this
 code change.  Thanks for providing it!

 Please find some more [https://gitweb.torproject.org/user/iwakeh/metrics-
 lib.git/?h=task-22279-2 tweaks (two commits)] for review.  The first
 commit is also intending to remove (intended) side-effects like adding to
 maps given as method arguments and make the code a little more explicit.
 Thus, easier to comprehend, I hope.
 The second commit removes a parameter that is not used anymore.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22279#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs