git-repo/subcmds
Raman Tenneti 6448a4f2af sync: Log repo sync state events as 'data' events.
git_trace2_event_log.py:
+ Added LogDataConfigEvents method to log 'data' events.
  Sync's current_sync_state and previous_sync_state are logged
  as 'data' events in the current log.

  It logs are key/value in the |config| argument. Each key is
  prefixed with |prefix| argument.

  The following are sample events that are logged during repo sync.

   {"event":"data",
   "sid":"repo-20210914T181545Z-P000330c0/repo-20210914T181545Z-P000330c0",
   "thread":"MainThread",
   "time":"2021-09-14T18:16:19.935846Z",
   "key":"previous_sync_state/repo.syncstate.main.synctime",
   "value":"2021-09-14T17:27:11.573717Z"}

   {"event":"data",
   "sid":"repo-20210914T181545Z-P000330c0/repo-20210914T181545Z-P000330c0",
   "thread":"MainThread",
   "time":"2021-09-14T18:16:19.955546Z",
   "key":"current_sync_state/repo.syncstate.main.synctime",
   "value":"2021-09-14T18:16:19.935979Z"}

tests/test_git_trace2_event_log.py:
+ Added unit tests

sync.py:
+ Changed logging calls to LogDataConfigEvents.

Tested:
$ ./run_tests

Tested it by running the following command multiple times.
$ repo_dev sync -j 20
  repo sync has finished successfully

  Verified config data is looged in trace2 event logs.

Bug: [google internal] b/199758376
Change-Id: I75fd830e90c1811ec28510538c99a2632b104e85
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317823
Reviewed-by: Josh Steadmon <steadmon@google.com>
Reviewed-by: Xin Li <delphij@google.com>
Tested-by: Raman Tenneti <rtenneti@google.com>
2021-09-14 21:36:12 +00:00
..
__init__.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
abandon.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
branches.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
checkout.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
cherry_pick.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
diff.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
diffmanifests.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
download.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
forall.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
gitc_delete.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
gitc_init.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
grep.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
help.py repo: refactor help output handling 2021-07-28 05:38:34 +00:00
info.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
init.py superproject - More friendly user message when superproject failed. 2021-07-14 00:41:36 +00:00
list.py list: add a --relative-to option 2021-07-27 06:20:52 +00:00
manifest.py manifest: Support ignoring local manifests with 'repo manifest' 2021-07-20 04:56:12 +00:00
overview.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
prune.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
rebase.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
selfupdate.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
smartsync.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
stage.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
start.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
status.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
sync.py sync: Log repo sync state events as 'data' events. 2021-09-14 21:36:12 +00:00
upload.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00
version.py commands: document the "common" class attribute 2021-06-15 06:07:37 +00:00