From 0c9df7e7d8f6935395cfea4977356d247ae28072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hm?= Date: Tue, 14 Nov 2023 10:00:43 +0100 Subject: [PATCH 1/2] Adds synthetic feature projects --- .../perf_tests/feature_perf_cs_collection.py | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/varats/varats/projects/perf_tests/feature_perf_cs_collection.py b/varats/varats/projects/perf_tests/feature_perf_cs_collection.py index 247b7491b..853efee77 100644 --- a/varats/varats/projects/perf_tests/feature_perf_cs_collection.py +++ b/varats/varats/projects/perf_tests/feature_perf_cs_collection.py @@ -1309,3 +1309,97 @@ def compile(self) -> None: def recompile(self) -> None: """Recompile the project.""" _do_feature_perf_cs_collection_recompile(self) + + +class SynthFeatureLargeConfigSpace(VProject): + """Synthetic case-study project for testing flow sensitivity.""" + + NAME = 'SynthFeatureLargeConfigSpace' + GROUP = 'perf_tests' + DOMAIN = ProjectDomains.TEST + + SOURCE = [ + bb.source.Git( + remote="https://github.com/se-sic/FeaturePerfCSCollection.git", + local="SynthFeatureLargeConfigSpace", + refspec="origin/f-FeatureCaseStudies", + limit=None, + shallow=False, + version_filter=project_filter_generator( + "SynthFeatureLargeConfigSpace" + ) + ), + FeatureSource() + ] + + @staticmethod + def binaries_for_revision( + revision: ShortCommitHash # pylint: disable=W0613 + ) -> tp.List[ProjectBinaryWrapper]: + return RevisionBinaryMap( + get_local_project_git_path(SynthFeatureLargeConfigSpace.NAME) + ).specify_binary( + "build/bin/LargeConfigSpace", + BinaryType.EXECUTABLE, + only_valid_in=RevisionRange("6863c78c24", "HEAD") + )[revision] + + def run_tests(self) -> None: + pass + + def compile(self) -> None: + """Compile the project.""" + _do_feature_perf_cs_collection_compile( + self, "FPCSC_ENABLE_PROJECT_SYNTHFEATURELARGECONFIGSPACE" + ) + + def recompile(self) -> None: + """Recompile the project.""" + _do_feature_perf_cs_collection_recompile(self) + + +class SynthFeatureRestrictedConfigSpace(VProject): + """Synthetic case-study project for testing flow sensitivity.""" + + NAME = 'SynthFeatureRestrictedConfigSpace' + GROUP = 'perf_tests' + DOMAIN = ProjectDomains.TEST + + SOURCE = [ + bb.source.Git( + remote="https://github.com/se-sic/FeaturePerfCSCollection.git", + local="SynthFeatureRestrictedConfigSpace", + refspec="origin/f-FeatureCaseStudies", + limit=None, + shallow=False, + version_filter=project_filter_generator( + "SynthFeatureRestrictedConfigSpace" + ) + ), + FeatureSource() + ] + + @staticmethod + def binaries_for_revision( + revision: ShortCommitHash # pylint: disable=W0613 + ) -> tp.List[ProjectBinaryWrapper]: + return RevisionBinaryMap( + get_local_project_git_path(SynthFeatureRestrictedConfigSpace.NAME) + ).specify_binary( + "build/bin/RestrictedConfigSpace", + BinaryType.EXECUTABLE, + only_valid_in=RevisionRange("6863c78c24", "HEAD") + )[revision] + + def run_tests(self) -> None: + pass + + def compile(self) -> None: + """Compile the project.""" + _do_feature_perf_cs_collection_compile( + self, "FPCSC_ENABLE_PROJECT_SYNTHFEATURERESTRICTEDCONFIGSPACE" + ) + + def recompile(self) -> None: + """Recompile the project.""" + _do_feature_perf_cs_collection_recompile(self) From 89ae7ee05b7f525fe2388514c06dcd5f045ebf76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6hm?= Date: Mon, 27 Nov 2023 13:04:14 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Florian Sattler --- .../varats/projects/perf_tests/feature_perf_cs_collection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varats/varats/projects/perf_tests/feature_perf_cs_collection.py b/varats/varats/projects/perf_tests/feature_perf_cs_collection.py index 853efee77..2ef8e4338 100644 --- a/varats/varats/projects/perf_tests/feature_perf_cs_collection.py +++ b/varats/varats/projects/perf_tests/feature_perf_cs_collection.py @@ -1322,7 +1322,7 @@ class SynthFeatureLargeConfigSpace(VProject): bb.source.Git( remote="https://github.com/se-sic/FeaturePerfCSCollection.git", local="SynthFeatureLargeConfigSpace", - refspec="origin/f-FeatureCaseStudies", + refspec="origin/HEAD", limit=None, shallow=False, version_filter=project_filter_generator( @@ -1369,7 +1369,7 @@ class SynthFeatureRestrictedConfigSpace(VProject): bb.source.Git( remote="https://github.com/se-sic/FeaturePerfCSCollection.git", local="SynthFeatureRestrictedConfigSpace", - refspec="origin/f-FeatureCaseStudies", + refspec="origin/HEAD", limit=None, shallow=False, version_filter=project_filter_generator(