Skip to content
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

ENH: more Pythonic datastructure for derived_metrics #924

Open
shanedsnyder opened this issue Apr 14, 2023 · 0 comments
Open

ENH: more Pythonic datastructure for derived_metrics #924

shanedsnyder opened this issue Apr 14, 2023 · 0 comments

Comments

@shanedsnyder
Copy link
Contributor

Currently, the derived_metrics value returned by PyDarshan's accumulate_records() routine is just a cdata object matching the C-level struct representation of derived metrics. We are using some less than ideal methods for working with this data requiring us to have knowledge of enum values, etc:

# the darshan_file_category enum is not really

We should see if we can make the data more Pythonic so it's more straightforward to use for PyDarshan consumers. Tyler had some quick suggestions elsewhere:

It is true that I don't like how there is a struct than then contains an array which has to be manually indexed based on knowledge of the C code to pull out some counter values. Maybe sketch out a design in another issue if you plan to flatten to a custom class or maybe even dataclass is appropriate... though dunno where it sits on priority side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant