-
Notifications
You must be signed in to change notification settings - Fork 2
[Compat] Darshan layer definitions #36
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
…g; introduce ensure_proc_view_type method for view type management.
…ess naming convention; refactor analysis method to support HLM processing.
…nventions in access patterns.
…tialization; move optional fields to the end of the class definition.
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.
Pull request overview
This PR refactors the dftracer analyzer to modularize the high-level metric (HLM) and view computation pipeline. The main changes extract complex analysis logic into a new _analyze_hlm helper method to improve code reuse and maintainability. Additional changes include updating the Layer enum to use LowercaseStrEnum for consistency with config dictionaries, reordering dataclass fields for clarity, fixing a naming inconsistency in metrics, and adding a helper method to ensure process view types.
- Extracted HLM analysis pipeline into reusable
_analyze_hlmmethod - Changed
Layerenum toLowercaseStrEnumfor consistency with lowercase config keys - Fixed naming consistency (
unique_proc_count→unique_process_count)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| python/dftracer/analyzer/types.py | Reordered AnalyzerResultType dataclass fields and made _traces optional with default value |
| python/dftracer/analyzer/darshan.py | Updated to use new _analyze_hlm method, added layer validation, fixed metric naming, improved proc_name construction |
| python/dftracer/analyzer/constants.py | Changed Layer enum from StrEnum to LowercaseStrEnum |
| python/dftracer/analyzer/analyzer.py | Extracted view computation logic into new _analyze_hlm method, added ensure_proc_view_type helper method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This pull request refactors the trace analysis logic in the
dftraceranalyzer, focusing on modularizing the high-level metric (HLM) and view computation pipeline. The main changes include extracting a large block of logic into a new_analyze_hlmmethod, improving code reuse and clarity, and updating type and enum usage for consistency. There are also some minor bug fixes and improvements to naming and typing.Core Refactoring and Pipeline Modularization:
Extracted the logic for computing layers, views, flat views, metric boundaries, and checkpointing from
analyze_traceinto a new helper method_analyze_hlm, simplifying the main analysis function and enabling code reuse in specialized analyzers. [1] [2]Updated the Darshan analyzer to use the new
_analyze_hlmpipeline, with stricter validation to ensure only the POSIX layer is supported.Type and Enum Improvements:
Changed the
Layerenum to inherit fromLowercaseStrEnumfor consistent lowercase string representation, and updated imports accordingly. [1] [2] [3]Updated the
AnalyzerResultTypedataclass to make_tracesoptional with a default value, and reordered fields for clarity.Bug Fixes and Naming Consistency:
Fixed a naming inconsistency in the Darshan analyzer result metrics: renamed
unique_proc_counttounique_process_countfor clarity.Ensured that
proc_nameis constructed using the correct application name in the Darshan file name view, improving consistency.Helper Method Extraction:
ensure_proc_view_typeto centralize the logic for ensuringCOL_PROC_NAMEis always included in view types. [1] [2]These changes improve maintainability, clarity, and correctness of the analysis pipeline, especially as more analyzers or view types are added in the future.