diff options
Diffstat (limited to 'git_trace2_event_log_base.py')
| -rw-r--r-- | git_trace2_event_log_base.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git_trace2_event_log_base.py b/git_trace2_event_log_base.py index 2f1aac76..56db7a8f 100644 --- a/git_trace2_event_log_base.py +++ b/git_trace2_event_log_base.py | |||
| @@ -130,10 +130,10 @@ class BaseEventLog: | |||
| 130 | "time": datetime.datetime.now(datetime.timezone.utc).isoformat(), | 130 | "time": datetime.datetime.now(datetime.timezone.utc).isoformat(), |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | def StartEvent(self): | 133 | def StartEvent(self, argv): |
| 134 | """Append a 'start' event to the current log.""" | 134 | """Append a 'start' event to the current log.""" |
| 135 | start_event = self._CreateEventDict("start") | 135 | start_event = self._CreateEventDict("start") |
| 136 | start_event["argv"] = sys.argv | 136 | start_event["argv"] = argv |
| 137 | self._log.append(start_event) | 137 | self._log.append(start_event) |
| 138 | 138 | ||
| 139 | def ExitEvent(self, result): | 139 | def ExitEvent(self, result): |
| @@ -159,9 +159,11 @@ class BaseEventLog: | |||
| 159 | name: Name of the primary command (ex: repo, git) | 159 | name: Name of the primary command (ex: repo, git) |
| 160 | subcommands: List of the sub-commands (ex: version, init, sync) | 160 | subcommands: List of the sub-commands (ex: version, init, sync) |
| 161 | """ | 161 | """ |
| 162 | command_event = self._CreateEventDict("command") | 162 | command_event = self._CreateEventDict("cmd_name") |
| 163 | name = f"{name}-" | ||
| 164 | name += "-".join(subcommands) | ||
| 163 | command_event["name"] = name | 165 | command_event["name"] = name |
| 164 | command_event["subcommands"] = subcommands | 166 | command_event["hierarchy"] = name |
| 165 | self._log.append(command_event) | 167 | self._log.append(command_event) |
| 166 | 168 | ||
| 167 | def LogConfigEvents(self, config, event_dict_name): | 169 | def LogConfigEvents(self, config, event_dict_name): |
