Skip to content

Commit

Permalink
Merge branch 'vara-dev' into f-GroupedTable
Browse files Browse the repository at this point in the history
  • Loading branch information
vulder authored Feb 10, 2024
2 parents 194b228 + 140f890 commit 7e0bad1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
7 changes: 4 additions & 3 deletions varats-core/varats/provider/patch/patch_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ def from_yaml(yaml_path: Path) -> 'Patch':

project_git_path = get_local_project_git_path(project_name)

# Update repository to have all upstream changes
fetch_repository(project_git_path)

def parse_revisions(
rev_dict: tp.Dict[str, tp.Any]
) -> tp.Set[CommitHash]:
Expand Down Expand Up @@ -300,6 +297,10 @@ def __init__(self, project: tp.Type[Project]):

self.__patches: tp.Set[Patch] = set()

# Update repository to have all upstream changes
project_git_path = get_local_project_git_path(self.project.NAME)
fetch_repository(project_git_path)

for root, _, files in os.walk(patches_project_dir):
for filename in files:
if not filename.endswith(".info"):
Expand Down
37 changes: 33 additions & 4 deletions varats/varats/plots/feature_perf_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from varats.plot.plot import Plot
from varats.plot.plots import PlotGenerator
from varats.plots.scatter_plot_utils import multivariate_grid
from varats.ts_utils.click_param_types import REQUIRE_MULTI_CASE_STUDY
from varats.utils.exceptions import UnsupportedOperation
from varats.utils.git_util import FullCommitHash

Expand Down Expand Up @@ -79,7 +80,7 @@ class PerfPrecisionDistPlot(Plot, plot_name='fperf_precision_dist'):
different profilers."""

def plot(self, view_mode: bool) -> None:
case_studies = get_loaded_paper_config().get_all_case_studies()
case_studies = self.plot_kwargs["case_studies"]
profilers: tp.List[Profiler] = [VXray(), PIMTracer(), EbpfTraceTEF()]

# Data aggregation
Expand Down Expand Up @@ -153,12 +154,40 @@ def calc_missing_revisions(


class PerfProfDistPlotGenerator(
PlotGenerator, generator_name="fperf-precision-dist", options=[]
PlotGenerator,
generator_name="fperf-precision-dist",
options=[REQUIRE_MULTI_CASE_STUDY]
):
"""Generates performance distribution plot."""
"""Generates performance distribution plot for a given list of case
studies."""

def generate(self) -> tp.List[Plot]:
return [PerfPrecisionDistPlot(self.plot_config, **self.plot_kwargs)]
case_studies = self.plot_kwargs.pop("case_study")
return [
PerfPrecisionDistPlot(
self.plot_config, case_studies=case_studies, **self.plot_kwargs
)
]


class PerfProfDistPlotGeneratorForEachCS(
PlotGenerator,
generator_name="fperf-precision-dist-cs",
options=[REQUIRE_MULTI_CASE_STUDY]
):
"""Generates performance distribution plot for each of the given case
studies."""

def generate(self) -> tp.List[Plot]:
case_studies = self.plot_kwargs.pop("case_study")
return [
PerfPrecisionDistPlot(
self.plot_config,
case_study=case_study,
case_studies=[case_study],
**self.plot_kwargs
) for case_study in case_studies
]


class PerfOverheadPlot(Plot, plot_name='fperf_overhead'):
Expand Down

0 comments on commit 7e0bad1

Please sign in to comment.