Implement the following plan: Add Debug Timing Logs to Git Hooks Context Performance…
Jump to turn (6)
- 1Implement the following plan: Add Debug Timing Logs to Git Hooks Context Perform
- 2I do want to track how much time takes to read all the session states
- 3I've been some perf testing by adding more than 100 session files bigger than 4M
- 4so, what are you assumpstions here ?
- 5create 3 different temporal repos emulating each scenario so we can test it
- 6[Request interrupted by user for tool use]
- User
Implement the following plan:
Add Debug Timing Logs to Git Hooks
Context
Performance testing of the prepare-commit-msg hook. Need visibility into how long the main hook methods take.
Approach
Add
logging.LogDurationcalls at the top of each main hook method usingdefer, so the total time of each method is logged atDEBUGlevel.Files to Modify
1.
cmd/entire/cli/strategy/manual_commit_hooks.goAdd
defer logging.LogDuration(...)at the top of:PrepareCommitMsg()(line 234)handleAmendCommitMsg()(line 393)CommitMsg()(line 125)PostCommit()(line 602)
Pattern
go