feat(Core/Playerbots): Add pmon file snapshots#2274
Open
scarecr0w12 wants to merge 1 commit intomod-playerbots:test-stagingfrom
Open
feat(Core/Playerbots): Add pmon file snapshots#2274scarecr0w12 wants to merge 1 commit intomod-playerbots:test-stagingfrom
scarecr0w12 wants to merge 1 commit intomod-playerbots:test-stagingfrom
Conversation
Author
|
quick test out put to show working |
Author
|
After some discussion, I was informed that this is already logged to the playerbots.log file when running standard commands. However, in my own opinion, separation of the PMON output to a separate, less cluttered file may be more appropriate and easier to navigate when troubleshooting issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Adds a dedicated file output mode for the
playerbots pmoncommand so performance snapshots can be reviewed later instead of only being visible in console/server logs.The change adds:
.playerbots pmon file.playerbots pmon file tick.playerbots pmon file stackThese commands append timestamped snapshots to
pmon.logusing the module's existing allowed log file mechanism. The existingpmon,pmon tick,pmon stack,pmon reset, andpmon togglebehavior is preserved.Feature Evaluation
PerfMonitor::PrintStatsformatting path and add a file sink that appends the same report lines topmon.log.pmon file [tick|stack].AiPlayerbot.AllowedLogFilessafeguard instead of introducing a new file permission/config system.pmon filecommand, at which point the monitor formats the already-collected stats and appends them to disk.How to Test the Changes
playerbots.conf, set:AiPlayerbot.PerfMonEnabled = 1AiPlayerbot.AllowedLogFiles = "pmon.log"worldserverwith mod-playerbots enabled..playerbots pmon file.playerbots pmon file tick.playerbots pmon file stackpmon.logis created underLogsDirand that each invocation appends a new timestamped snapshot instead of overwriting the file..playerbots pmon.playerbots pmon tick.playerbots pmon stackImpact Assessment
Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots?
Explanation: the new logic is only executed on explicit GM/console command invocation. It does not add recurring bot AI work.
Does this change modify default bot behavior?
Does this change add new decision branches or increase maintenance complexity?
AI Assistance
Was AI assistance used while working on this change?
Purpose of usage: code exploration, implementation drafting, and PR body drafting.
All generated or suggested changes were reviewed, adjusted, and understood before preparing the PR.
Final Checklist
Notes for Reviewers
pmon.logmust be added toAiPlayerbot.AllowedLogFilesfor file output to work.