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

Profiling parameterized benchmarks for a single parameter #1434

Open
philipc2 opened this issue Sep 18, 2024 · 0 comments
Open

Profiling parameterized benchmarks for a single parameter #1434

philipc2 opened this issue Sep 18, 2024 · 0 comments

Comments

@philipc2
Copy link

I have an ASV benchmark defined as follows:

class DatasetBenchmark:
    """Class used as a template for benchmarks requiring a ``UxDataset`` in
    this module across both resolutions."""
    param_names = ['resolution',]
    params = [['480km', '120km'],]


    def setup(self, resolution, *args, **kwargs):
        self.uxds = ux.open_dataset(file_path_dict[resolution][0], file_path_dict[resolution][1])

    def teardown(self, resolution, *args, **kwargs):
        del self.uxds

class Gradient(DatasetBenchmark):
    def time_gradient(self, resolution):
        self.uxds[data_var].gradient()

I want to profile this benchmark for a single parameter, for example for resolution='480km'. I haven't been able to find the correct way to do this in the documentation or online. Any suggestions

UXARRAY/uxarray-asv#2

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

No branches or pull requests

1 participant