pickhardtpayments icon indicating copy to clipboard operation
pickhardtpayments copied to clipboard

managend pickhardt_pay verbosity with two optional arguments #17

Open sebulino opened this issue 3 years ago • 2 comments

currently statistical summaries are printed in pickhardt_pay in each round of payment attempts and in the end. I added two flags to pickhardt_pay method as optional arguments:

  • summary(default: False) for the final statistics.
  • round_verbosity(default: False) for the statistics on the payment attempts in each loop. Statistics for each loop have their own method, _evaluate_attempts, where I added the optional argument as well (default: False).

_evaluate_attempts will receive the optional argument from pickhardt_pay. My initial thought was to make the whole call of _evaluate_attempts dependent on the verbosity choice in the pickhardt_pay call. However, this would not work, as the pickhardt_pay call needs to receive the return values from _evaluate_attempts for its final summary.

All statistics are printed to console.

sebulino avatar May 17 '22 11:05 sebulino

While I think this is very much needed I was more thinking of using https://docs.python.org/3/howto/logging.html#logging-basic-tutorial. sorry should have linked this in #17

renepickhardt avatar May 17 '22 13:05 renepickhardt

The idea is to record the current statistics for payment rounds as well as the final one as logging.info, and any split between round-based statistics and final statistic would then be grepped at one's own discretion afterwards.

sebulino avatar May 17 '22 16:05 sebulino