Skip to content

Commit

Permalink
ENH(BM): add benchmark on feeding paths to subdasets call
Browse files Browse the repository at this point in the history
not sure if it would be effective benchmark in this not so big
superdataset, but something at least
  • Loading branch information
yarikoptic committed Dec 15, 2022
1 parent f6126f6 commit 46eb0e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions benchmarks/api.py
Expand Up @@ -86,6 +86,12 @@ def time_ls_recursive_long_all(self):
def time_subdatasets(self):
self.ds.subdatasets()

def time_subdatasets_with_all_paths_recursive(self):
# to see if we do not get O(N^2) performance
subdatasets = self.ds.subdatasets(recursive=True, result_xfm='relpaths')
subdatasets2 = self.ds.subdatasets(path=subdatasets, recursive=True, result_xfm='relpaths')
assert subdatasets == subdatasets2

def time_subdatasets_recursive(self):
self.ds.subdatasets(recursive=True)

Expand Down

0 comments on commit 46eb0e3

Please sign in to comment.