Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

managend pickhardt_pay verbosity with two optional arguments #17 #21

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

sebulino
Copy link
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.

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
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
Copy link
Contributor Author

sebulino commented May 17, 2022

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