summaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorRam Peri <ramperi@google.com>2026-04-21 00:02:47 +0000
committergerrit-scoped@luci-project-accounts.iam.gserviceaccount.com <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2026-04-21 17:10:07 -0700
commit5af71ce907848a546199f0d64a5dfba1db8adca0 (patch)
tree511327039aeb7db3d08a1fdc6bdb7b537116d63d /tests/conftest.py
parentbaa281d99e59dbf1447524e6fd95b384cadbc06e (diff)
downloadgit-repo-5af71ce907848a546199f0d64a5dfba1db8adca0.tar.gz
Add timing keyword argument for hooks
Measure the duration of the sync operation in the Execute method of the Sync command and pass it to post-sync hooks as a standard keyword argument (`sync_duration_seconds`). Updates based on code review: - Update _API_ARGS in hooks.py to allow sync_duration_seconds for post-sync hooks. - Do not cast sync_duration_seconds to int for better granularity. - Update docs/repo-hooks.md to document sync_duration_seconds. - Add unit test for argument validation in test_hooks.py. Test: Ran run_tests using venv python, all 554 tests passed. Bug: TBD Change-Id: Ie29e002a5d283460d993ad96c224dbf4b6d7985c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/575021 Tested-by: Arif Kasim <arifkasim@google.com> Commit-Queue: Ram Peri <ramperi@google.com> Reviewed-by: Arif Kasim <arifkasim@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
Diffstat (limited to 'tests/conftest.py')
0 files changed, 0 insertions, 0 deletions