Skip to content

managend pickhardt_pay verbosity with two optional arguments #17#21

Open
sebulino wants to merge 8 commits into
renepickhardt:mainfrom
sebulino:pickhardt_pay_verbosity
Open

managend pickhardt_pay verbosity with two optional arguments #17#21
sebulino wants to merge 8 commits into
renepickhardt:mainfrom
sebulino:pickhardt_pay_verbosity

Conversation

@sebulino

Copy link
Copy Markdown
Contributor

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 added 8 commits May 13, 2022 16:57
first stub of a method as described in  renepickhardt#16
Still needs to be tested
statistics (round_verbosity) can be added for each round of payment attempts and/or can be added as a final summary (summary).
statistics (round_verbosity) can be added for each round of payment attempts and/or can be added as a final summary (summary).
@renepickhardt

Copy link
Copy Markdown
Owner

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

@sebulino

sebulino commented May 17, 2022

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants