Move boot time message sending logic to SystemdAnalyze class#4060
Draft
Move boot time message sending logic to SystemdAnalyze class#4060
Conversation
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add UnifiedMessage for ProvisionBootTimeMessage
Add UnifiedProvisionBootTimeMessage for standardized boot time metric reporting
Oct 20, 2025
squirrelsc
reviewed
Oct 20, 2025
…fiedPerfMessage Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
squirrelsc
reviewed
Oct 20, 2025
… time data Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Copilot
AI
changed the title
Add UnifiedProvisionBootTimeMessage for standardized boot time metric reporting
Add send_boot_time_metrics method to send UnifiedPerfMessage for boot time data
Oct 21, 2025
squirrelsc
reviewed
Oct 21, 2025
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Copilot
AI
changed the title
Add send_boot_time_metrics method to send UnifiedPerfMessage for boot time data
Send UnifiedPerfMessage for boot time metrics alongside ProvisionBootTimeMessage
Oct 21, 2025
squirrelsc
reviewed
Oct 21, 2025
lisa/tools/systemd_analyze.py
Outdated
| def _send_unified_boot_time_metrics( | ||
| self, | ||
| boot_time: ProvisionBootTimeMessage, | ||
| test_result: "TestResult", |
Member
There was a problem hiding this comment.
- Remove test_result: "TestResult", test_case_name: str = "". Set related
- Make testresult is optional in underlying method:
send_unified_perf_message
Contributor
Author
There was a problem hiding this comment.
Removed test_result and test_case_name parameters and removed all UnifiedPerfMessage sending logic since it's not needed. The method now only sends ProvisionBootTimeMessage. Commit: eebdc4f
Member
There was a problem hiding this comment.
Revert the commit. The PR is to send unified perf message. Move underlying test_result is optional for send_unified_perf_message.
Co-authored-by: squirrelsc <27178119+squirrelsc@users.noreply.github.com>
Copilot
AI
changed the title
Send UnifiedPerfMessage for boot time metrics alongside ProvisionBootTimeMessage
Move boot time message sending logic to SystemdAnalyze class
Oct 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR moves the boot time message sending logic from
operating_system.pyto theSystemdAnalyzeclass, centralizing boot time message handling in a single location.Problem
The boot time message sending logic was scattered between
operating_system.pyand theSystemdAnalyzetool, making it harder to maintain and understand. The logic inoperating_system.pydirectly calledget_boot_time()and handled the notification manually.Solution
Moved the boot time message sending logic to a new
send_boot_time_messages()method inlisa/tools/systemd_analyze.py:New
send_boot_time_messages()method:This method:
get_boot_time()to retrieve boot time dataProvisionBootTimeMessagenotificationUpdated
operating_system.py:SystemdAnalyze.send_boot_time_messages()systemd_analyze_tool.send_boot_time_messages()instead of manually handling boot timeUsage
When
capture_boot_timeis enabled, boot time messages are automatically sent during system initialization by calling thesend_boot_time_messages()method on theSystemdAnalyzetool.Benefits
SystemdAnalyzeclassProvisionBootTimeMessagebehavior unchangedTesting
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.