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

Adds synthetic feature projects #864

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions varats/varats/projects/perf_tests/feature_perf_cs_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/HEAD",
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/HEAD",
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)
Loading