From 2d42787008185ec7a85ee33ebc6b87f555274995 Mon Sep 17 00:00:00 2001 From: Lukas Abelt Date: Fri, 2 Feb 2024 10:33:40 +0100 Subject: [PATCH 1/2] Less fetching for PatchProvider (#875) Significantly reduce the fetch requests by the patch provider. Co-authored-by: Lukas Abelt --- varats-core/varats/provider/patch/patch_provider.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/varats-core/varats/provider/patch/patch_provider.py b/varats-core/varats/provider/patch/patch_provider.py index 34096ae5b..9cc802da4 100644 --- a/varats-core/varats/provider/patch/patch_provider.py +++ b/varats-core/varats/provider/patch/patch_provider.py @@ -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]: @@ -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"): From 140f890b0830440ab0c9fdbdfb12a0a597245200 Mon Sep 17 00:00:00 2001 From: Florian Sattler Date: Sat, 10 Feb 2024 12:09:33 +0100 Subject: [PATCH 2/2] Implements generator to automatically generate a performance precision plot per case study (#874) --- varats/varats/plots/feature_perf_precision.py | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/varats/varats/plots/feature_perf_precision.py b/varats/varats/plots/feature_perf_precision.py index eee2a25cc..6b232b1c2 100644 --- a/varats/varats/plots/feature_perf_precision.py +++ b/varats/varats/plots/feature_perf_precision.py @@ -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 @@ -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 @@ -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'):