-
Notifications
You must be signed in to change notification settings - Fork 7
Enhance structured logging initialization and test coverage #32
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
Conversation
Summary: - Updated `tritonparse.structured_logging.init` to accept an `enable_trace_launch` parameter, allowing for improved logging capabilities. - Modified test files to utilize the new logging feature and verify event type counts in generated log files, ensuring accurate tracking of 'launch' and 'compilation' events. - Added checks in `test_tritonparse.py` to assert the expected counts of log events, enhancing test robustness. These changes aim to improve the logging functionality and ensure comprehensive testing of the logging behavior.
Summary: - Introduced helper methods to streamline kernel creation, execution, and log verification in the test suite. - Enhanced the test workflow by separating concerns into dedicated methods for setting up directories, generating test data, and verifying log outputs. - Updated the `test_whole_workflow` method to utilize the new helper methods, improving readability and maintainability. - Added assertions to verify event counts and parsing output, ensuring comprehensive testing of the unified_parse functionality. These changes aim to enhance the organization and robustness of the test suite, facilitating easier future modifications and debugging.
…ity and functionality Summary: - Consolidated kernel creation and execution into the `test_whole_workflow` method, enhancing readability. - Removed redundant helper methods and integrated their logic directly into the test, streamlining the workflow. - Added assertions to verify the existence of log files and event counts, ensuring comprehensive testing of the unified_parse functionality. - Simplified setup and data generation processes within the test, improving maintainability. These changes aim to enhance the organization and robustness of the test suite, facilitating easier future modifications and debugging.
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.
lgtm!
@@ -981,13 +981,16 @@ def init_basic(trace_folder: Optional[str] = None): | |||
maybe_enable_trace_launch() | |||
|
|||
|
|||
def init(trace_folder: Optional[str] = None): | |||
def init(trace_folder: Optional[str] = None, enable_trace_launch: bool = False): | |||
""" | |||
This function is a wrapper around init_basic() that also setup the compilation listener. | |||
|
|||
Args: | |||
trace_folder (Optional[str]): The folder to store the trace files. |
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.
nit: description for enable_trace_launch
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.
ah, sorry, didn't see this comment. Will fix in next BE PR for comments.
Summary:
tritonparse.structured_logging.init
to accept anenable_trace_launch
parameter, allowing for improved logging capabilities.test_tritonparse.py
to assert the expected counts of log events, enhancing test robustness.These changes aim to improve the logging functionality and ensure comprehensive testing of the logging behavior.