-
Notifications
You must be signed in to change notification settings - Fork 558
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
Core: smarter fill logging #3575
base: main
Are you sure you want to change the base?
Core: smarter fill logging #3575
Conversation
What does the log file look like with this? Does it add a line for every placed item? or every quarter second? |
If you're talking about the screenshot, it's updating at most every quarter second (the "min_time" field specifies minimum time elapsed between logging updates). If quarter second is seen as too fast for logging updates it's pretty easy to slow it down by bumping the min_time field. The "min_time" field is only applicable to tty-based logging. The other field (min_size) is for non-tty based logging (to files or pipes), and specifies the smallest size increment there as 1000 items. If you're talking about logs in the logs directory there's currently a bug such that those log files are receiving carriage returns and obviously shouldn't be (receiving tty logs when they should only get non-tty logs). I only discovered this issue recently and have an update I'll be pushing soon to address it (it can take a while to test logging for all sizes of seeds). |
…ile/NoStream properly) - PEP8 formmating
Please format your title with what portion of the project this pull request is
targeting and what it's changing.
ex. "MyGame4: implement new game" or "Docs: add new guide for customizing MyGame3"
What is this fixing or adding?
Replace current Fill logging with a more dynamic logging mechanism. Scales appropriately between small, medium, and large seeds.
It doesn't log anything smaller than "min_size" (currently set to 1000 to match pre-existing logic).
It doesn't log any faster than "min_time" (currently 1/4 second).
Because of the introduction of carriage return, safeguards are put in to make sure any output heading to a non-tty location don't include said carriage return (it does nasty things to log files).
How was this tested?
Generating many, many seeds and watching them.
Genned:
All tests were done with python 3.11.
If this makes graphical changes, please attach screenshots.
Note status when done:
![Screenshot 2024-06-20 at 17 44 20](https://private-user-images.githubusercontent.com/4594575/341602929-4dd6024e-7197-42c5-9256-68e5e14500f7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA5OTg0NTEsIm5iZ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1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTRUMjMwMjMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODE4MjU5MDkwMDQ4NjA1MzdmN2Y4YmQ2YjFhMjQ3NWRmNjQ2ZGY2MDM4NTJlMGVhYjRiMzQ1MWUwMzUyNmEyNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.w2PWDqIOAS1tOFxCJVXnixrEyq-SVHJdOrNpeEIiXWg)
[edit to add: log files are also changed; this can be rolled back easily if requested]
![Screenshot 2024-07-04 at 15 55 49](https://private-user-images.githubusercontent.com/4594575/345962663-53e9c242-e86f-4ea0-9433-efaf95714e56.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA5OTg0NTEsIm5iZiI6MTcyMDk5ODE1MSwicGF0aCI6Ii80NTk0NTc1LzM0NTk2MjY2My01M2U5YzI0Mi1lODZmLTRlYTAtOTQzMy1lZmFmOTU3MTRlNTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTRUMjMwMjMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmEyZDFiZmNmYzJlOTliODM3NzMzYWYxOGZkOTJjMTM0MzcwYTliNWQyOWI5ZjI5OTk5ZjY1MjY2YjM3ZjBmZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.oHiHmE_505JOVXKSjHeD1jjh_hK5muY3crMVOTOkaT0)
In the log file: