Skip to content

Commit

Permalink
Use ConfigParams in more projects
Browse files Browse the repository at this point in the history
  • Loading branch information
danjujan committed Nov 1, 2023
1 parent 5ed9157 commit 550f1f5
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 18 deletions.
15 changes: 8 additions & 7 deletions varats/varats/experiments/vara/llvm_coverage_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,14 @@ def analyze(self, tmp_dir: Path) -> actions.StepResult: # pylint: disable=too-m
# seperate args in plumbum command
# otherwise overwrites potentially redirected stdout, stdin
pb_cmd = cmd.as_plumbum(project=self.project)
seperated_args = []
for arg in pb_cmd.args:
if arg in extra_args:
seperated_args.extend(arg.split(' ', 1))
else:
seperated_args.append(arg)
pb_cmd.args = seperated_args
if hasattr(pb_cmd, "args"):
seperated_args = []
for arg in pb_cmd.args:
if arg in extra_args:
seperated_args.extend(arg.split(' ', 1))
else:
seperated_args.append(arg)
pb_cmd.args = seperated_args

profile_raw_name = tmp_dir / create_workload_specific_filename(
"coverage_report",
Expand Down
8 changes: 7 additions & 1 deletion varats/varats/projects/c_projects/bzip2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from plumbum import local

from varats.containers.containers import ImageBase, get_base_image
from varats.experiment.workload_util import RSBinary, WorkloadCategory
from varats.experiment.workload_util import (
RSBinary,
WorkloadCategory,
ConfigParams,
)
from varats.paper.paper_config import PaperConfigSpecificGit
from varats.project.project_domain import ProjectDomains
from varats.project.project_util import (
Expand Down Expand Up @@ -142,6 +146,7 @@ class Bzip2(VProject):
WorkloadSet(WorkloadCategory.JAN): [
VCommand(
SourceRoot("bzip2") / RSBinary("bzip2"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("geo-maps/countries-land-250m.geo.json"),
label="countries-land-250m-compress",
Expand All @@ -151,6 +156,7 @@ class Bzip2(VProject):
),
VCommand(
SourceRoot("bzip2") / RSBinary("bzip2"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("xz_files/xz-5.4.0.tar.bz2"),
label="xz-files-compressed",
Expand Down
8 changes: 7 additions & 1 deletion varats/varats/projects/c_projects/gzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from plumbum import local

from varats.containers.containers import get_base_image, ImageBase
from varats.experiment.workload_util import RSBinary, WorkloadCategory
from varats.experiment.workload_util import (
RSBinary,
WorkloadCategory,
ConfigParams,
)
from varats.paper.paper_config import ( # project_filter_generator,
PaperConfigSpecificGit,
)
Expand Down Expand Up @@ -125,6 +129,7 @@ class Gzip(VProject, ReleaseProviderHook):
WorkloadSet(WorkloadCategory.JAN): [
VCommand(
SourceRoot("gzip") / RSBinary("gzip"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("geo-maps/countries-land-250m.geo.json"),
label="countries-land-250m-compress",
Expand All @@ -134,6 +139,7 @@ class Gzip(VProject, ReleaseProviderHook):
),
VCommand(
SourceRoot("gzip") / RSBinary("gzip"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("xz_files/xz-5.4.0.tar.gz"),
label="xz-files-compressed",
Expand Down
9 changes: 8 additions & 1 deletion varats/varats/projects/c_projects/picosat.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
from plumbum import local

from varats.containers.containers import ImageBase, get_base_image
from varats.experiment.workload_util import RSBinary, WorkloadCategory
from varats.experiment.workload_util import (
RSBinary,
WorkloadCategory,
ConfigParams,
)
from varats.paper.paper_config import PaperConfigSpecificGit
from varats.project.project_domain import ProjectDomains
from varats.project.project_util import (
Expand Down Expand Up @@ -130,6 +134,7 @@ class PicoSAT(VProject, ReleaseProviderHook):
WorkloadSet(WorkloadCategory.JAN): [
VCommand(
SourceRoot("picosat") / RSBinary("picosat"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("aim-100-1_6-no-1.cnf"),
creates=[
Expand All @@ -142,6 +147,7 @@ class PicoSAT(VProject, ReleaseProviderHook):
),
VCommand(
SourceRoot("picosat") / RSBinary("picosat"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("aim-100-1_6-yes1-1.cnf"),
creates=[
Expand All @@ -154,6 +160,7 @@ class PicoSAT(VProject, ReleaseProviderHook):
),
VCommand(
SourceRoot("picosat") / RSBinary("picosat"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot(
"traffic_kkb_unknown.cnf/traffic_kkb_unknown.cnf"
Expand Down
10 changes: 7 additions & 3 deletions varats/varats/projects/c_projects/xz.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
from plumbum import local

from varats.containers.containers import ImageBase, get_base_image
from varats.experiment.workload_util import RSBinary, WorkloadCategory
from varats.experiment.workload_util import (
RSBinary,
WorkloadCategory,
ConfigParams,
)
from varats.paper.paper_config import PaperConfigSpecificGit
from varats.project.project_domain import ProjectDomains
from varats.project.project_util import (
Expand Down Expand Up @@ -128,7 +132,7 @@ class Xz(VProject):
VCommand(
SourceRoot("xz") / RSBinary("xz"),
"--threads=1",
"--format=xz",
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("geo-maps/countries-land-250m.geo.json"),
label="countries-land-250m-compress",
Expand All @@ -139,7 +143,7 @@ class Xz(VProject):
VCommand(
SourceRoot("xz") / RSBinary("xz"),
"--threads=1",
"--format=xz",
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("xz_files/xz-5.4.0.tar.xz"),
label="xz-files-compressed",
Expand Down
11 changes: 10 additions & 1 deletion varats/varats/projects/cpp_projects/ect.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
from plumbum import local

from varats.containers.containers import get_base_image, ImageBase
from varats.experiment.workload_util import RSBinary, WorkloadCategory
from varats.experiment.workload_util import (
RSBinary,
WorkloadCategory,
ConfigParams,
)
from varats.paper.paper_config import PaperConfigSpecificGit
from varats.project.project_domain import ProjectDomains
from varats.project.project_util import (
Expand Down Expand Up @@ -94,6 +98,7 @@ class Ect(VProject):
WorkloadSet(WorkloadCategory.JAN): [
VCommand(
SourceRoot("ect") / RSBinary("ect"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("archlinux.png"),
creates=["archlinux.png"],
Expand All @@ -102,6 +107,7 @@ class Ect(VProject):
),
VCommand(
SourceRoot("ect") / RSBinary("ect"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("vara.jpg"),
creates=["vara.jpg"],
Expand All @@ -110,6 +116,7 @@ class Ect(VProject):
),
VCommand(
SourceRoot("ect") / RSBinary("ect"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("ect.zip"),
creates=["ect.zip"],
Expand All @@ -118,6 +125,7 @@ class Ect(VProject):
),
VCommand(
SourceRoot("ect") / RSBinary("ect"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("ect.tar.gz"),
creates=["ect.tar.gz"],
Expand All @@ -126,6 +134,7 @@ class Ect(VProject):
),
VCommand(
SourceRoot("ect") / RSBinary("ect"),
ConfigParams(),
output_param=["{output}"],
output=SourceRoot("ect_src"),
creates=["ect_src.zip"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,18 @@ class FeaturePerfCSCollection(VProject):

WORKLOADS = {
WorkloadSet(WorkloadCategory.JAN): [
Command(
VCommand(
SourceRoot("FeaturePerfCSCollection") /
RSBinary("SimpleFeatureInteraction"),
ConfigParams(),
label="SFI-no-input"
)
],
WorkloadSet(WorkloadCategory.JAN_2): [
Command(
VCommand(
SourceRoot("FeaturePerfCSCollection") /
RSBinary("MultiSharedMultipleRegions"),
ConfigParams(),
label="MSMR-no-input"
)
],
Expand Down Expand Up @@ -132,8 +134,6 @@ class FeaturePerfCSCollection(VProject):
]
}

CONTAINER = get_base_image(ImageBase.DEBIAN_12)

@staticmethod
def binaries_for_revision(
revision: ShortCommitHash # pylint: disable=W0613
Expand Down

0 comments on commit 550f1f5

Please sign in to comment.