-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate all runner_on_* events with their start/stop/duration times #405
Annotate all runner_on_* events with their start/stop/duration times #405
Conversation
Build failed.
|
This is incredibly useful information to have for a variety of needs.
Build succeeded.
|
Right now I also have #404 open. Some quick thoughts:
|
I disagree - we want to avoid as much post-processing of the returned events as possible - if you're operating across one million events doing data processing, having to query all the events and then compute can be expensive.
Will look. |
This is the other place this is done:
That also does isoformat |
That's when it processes it from the disk, if I'm reading that right, which is already after the event has finished. That's sufficiently removed from the actual event generation in Ansible that I'd prefer to do that directly on the task start. |
I do see now how these are really different animals. Logic for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the best place to put this information. I think I'm good with this.
This PR is targeting the |
Apparently it let me, so I went ahead and changed the base |
@@ -498,6 +520,7 @@ def v2_runner_on_start(self, host, task): | |||
host=host.get_name(), | |||
task=task | |||
) | |||
self._host_start[host.get_name()] = current_time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work on Ansible pre-2.8, because runner_on_start
was introduced in 2.8:
This is incredibly useful information to have for a variety of needs.
Stolen from https://github.com/ansible/ansible-baseline/.