-
Notifications
You must be signed in to change notification settings - Fork 22
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
Introduce event metadata and UTC date formatting #385
Conversation
I'm not going to answer comments individually, but we discussed this offline and here is the takeaway:
Next step will be to rebase and rework this on top of the event rework, once ready. |
70ecafa
to
159077a
Compare
Based on #388. New version just reuses the current A few other improvements in this PR, linked to how to display events. |
db8207f
to
f0cc1b9
Compare
c8s runtime test failed for an unrelated reason. Same as #388, we can put it aside for now. |
f0cc1b9
to
35d1c5c
Compare
On top of the event metadata additions, pushed the first user of this feature: UTC date formatting. This improves the PR I believe as it shows a first user of the feature. While at it, made a few changes to the way we control the format when displaying events. |
e1fed23
to
768e782
Compare
Also, we might need a section in the docs for the new event section? |
Yep. We'd need a new page about the event sections too as only the collector sections are described as of now. I'll add it. |
9aca6ab
to
905dfca
Compare
905dfca
to
e1c7893
Compare
Pushed with most of the comments (multiline format, docs, optional smp_id, etc) taken into account. It doesn't contain modifications related to the nature of md events, as discussion is ongoing. |
To sum up the current state of this PR, two modifications are needed:
Thinking more about the two above points, some things are missing in this PR to have a clean implementation. For point 1, the current state giving a single (We don't strictly need the above as only the core is generating an event section right now, but not introducing this would feel weird and not allow any future user). For point 2 things are not straightforward. My initial thought was to let some section not implement |
e1c7893
to
677aee2
Compare
I introduced a (For reference I don't think this can be solved at the event dequeuing part -
I removed entirely conditionals to print or not print events based on their sections. We currently only have a single non-raw section and as discussed with @amorenoz we actually might want to display it. In any way, it's fine for now. I think the way forward for this is to work on #411 and then explicit the list of sections we want to see. This will need some thinking to have a clean implementation. In addition to the above I renamed the "global" event section into "startup" and added comments on the task event section. My only concern would be about the event reordering, although nothing would be impacted here. I believe this is a separate topic that needs some discussion and I think this series is ready; but this is not a strong opinion, if you consider this should be solved here. (c8s runtime CI is expected to fail as I did not rebase onto main, to keep diffs understandable). |
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.
I have some small comments but overall the PR looks awesome. I have played with it and it's great.
Also describe all the non-collector sections. Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
next_event does return EOF. Signed-off-by: Antoine Tenart <[email protected]>
In addition to $title, - Makes newlines more consistent and not starting before the first event. - Fixes the series output (indentation between the non-first event and theirs sections). Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
This new type mimic `struct timespec` to allow storing time in events. Signed-off-by: Antoine Tenart <[email protected]>
Let collectors store additional events at init and later time. This can be used to store global configuration or data relevant for all future events. The ability for collectors to keep the factory and use it in a thread was tested. Signed-off-by: Antoine Tenart <[email protected]>
The startup event section is emitted at collection startup time and contains global information related to the whole collection. Currently it has the Retis version used for the collection. Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
DisplayFormat was an enum, which does not modelize well its capabilities. The format could embed more specific information than a generic flavor, eg. to control the display of a given type or to give more control to a sub-section about how the formatting should be done. This makes it a struct to allow embedding various kinds of information. The multi vs single line information is now embedded as a boolean. Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
Also embed a monotonic clock offset in case we need it (eg. for the UTC date format). Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
Signed-off-by: Antoine Tenart <[email protected]>
Change the delimiter char from + to ↳ when printing events in a series. Suggested-by: Adrian Moreno <[email protected]> Signed-off-by: Antoine Tenart <[email protected]>
This makes this display logic more self described and more aligned with "PrintSeries". Suggested-by: Adrian Moreno <[email protected]> Signed-off-by: Antoine Tenart <[email protected]>
Suggested-by: Adrian Moreno <[email protected]> Signed-off-by: Antoine Tenart <[email protected]>
677aee2
to
9afba77
Compare
@amorenoz thanks for the reviews and the good suggestions! I took all into account and had to rebase onto main to resolve a conflict. |
As usual, some weeks rawhide does not issue a libvirt image. This is why all the runtime tests are failing. |
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.
Looks good to me, thanks.
This adds event metadata to the events file allowing non-event information to be stored for post-processing. As an example, the Retis version is included as metadata. I decided not to follow the proposal in #179 to allow lazy parsing of events. This looks like:
At core metadata events are a special case of events but reuse the same logic and most of the events implementation. I've decided to still split the two types but we could just make them a normal event and reuse even more code (minor modifications to the Event implementation would be needed).
The file factory can now return normal and metadata events as part of its processing. I've decided not to force metadata events to be special (eg. only one in the event file or being on top of the normal events). This could allow metadata to be filled in flight or to be overridden later on.
PR is not fully ready (tests weren't converted) but is enough to start the discussion.
Fixes #179, #299.