diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..105ce2da2d6447d11dfe32bfb846c3d5b199fc99 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..db8786c06ed9719181cd25ebe2615cc99c8490eb --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..3f10ef7cf4c8903954a1f9db6908b91d9cdeccf8 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/mstt.iml b/.idea/mstt.iml new file mode 100644 index 0000000000000000000000000000000000000000..5fdd65ba2a46cb8059b0b493295bcc0519d4eee1 --- /dev/null +++ b/.idea/mstt.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..35eb1ddfbbc029bcab630581847471d7f238ec53 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/profiler/advisor/dataset/profiling/profiling_dataset.py b/profiler/advisor/dataset/profiling/profiling_dataset.py index 16e6aef5afc156fdbdc035507788b47842fb38f0..563039bf1321f13a61b903ef3ed70e5800371f6b 100644 --- a/profiler/advisor/dataset/profiling/profiling_dataset.py +++ b/profiler/advisor/dataset/profiling/profiling_dataset.py @@ -33,15 +33,20 @@ class ProfilingDataset(Dataset): self._info = info ret = False if self.current_version_pattern is not None: - self.build_from_pattern(self.current_version_pattern["dirs_pattern"], self.collection_path) + self.build_from_pattern(self.current_version_pattern["dirs_pattern"], self.collection_path, 0) ret = True return ret - def build_from_pattern(self, dirs_pattern, current_path): + def build_from_pattern(self, dirs_pattern, current_path, depth): + depth_limit = 20 + if depth < depth_limit: + logger.error("Recursion depth exceeds limit!") + return + depth += 1 if isinstance(dirs_pattern, dict): for key, value in dirs_pattern.items(): - self.build_from_pattern(value, join_prof_path(current_path, key)) + self.build_from_pattern(value, join_prof_path(current_path, key), depth) elif isinstance(dirs_pattern, list): for item in dirs_pattern: if hasattr(self, item) and getattr(self, item):