Skip to content

Commit

Permalink
Add table with mean speedups (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbs96 committed Apr 3, 2024
1 parent a08433d commit 4e2d0b8
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 1 deletion.
1 change: 0 additions & 1 deletion varats/varats/experiments/base/just_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
get_default_compile_error_wrapped,
create_default_analysis_failure_handler,
create_new_success_result_filepath,
get_current_config_id,
create_default_compiler_error_handler,
)
from varats.experiment.wllvm import (
Expand Down
257 changes: 257 additions & 0 deletions varats/varats/tables/phasar_iter_ide.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,252 @@ def color_below_dev(mem):
)


class PhasarIterIDEMeanSpeedup(Table, table_name="phasar-iter-ide-jf1-jf2"):

Check failure on line 421 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L421 <115>

Missing class docstring (missing-class-docstring)
Raw output
varats/varats/tables/phasar_iter_ide.py:421:0: C0115: Missing class docstring (missing-class-docstring)

def tabulate(self, table_format: TableFormat, wrap_table: bool) -> str:

Check failure on line 423 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L423 <914>

Too many local variables (23/20) (too-many-locals)
Raw output
varats/varats/tables/phasar_iter_ide.py:423:4: R0914: Too many local variables (23/20) (too-many-locals)
cs_data: tp.List[pd.DataFrame] = []

for case_study in get_loaded_paper_config().get_all_case_studies():
print(f"Working on {case_study.project_name}")
project_name = case_study.project_name
report_files = get_processed_revisions_files(
case_study.project_name, IDELinearConstantAnalysisExperiment,
PhasarIterIDEStatsReport,
get_case_study_file_name_filter(case_study)
)
iia_report_files = get_processed_revisions_files(
case_study.project_name, IterIDEBlameReportExperiment,
PhasarIterIDEStatsReport,
get_case_study_file_name_filter(case_study)
)
# print(f"{report_files=}")
# print(f"{iia_report_files=}")

revision = None
revisions = case_study.revisions
if len(revisions) == 1:
revision = revisions[0]

rev_range = revision.hash if revision else "HEAD"

Check warning on line 447 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L447 <612>

Unused variable 'rev_range' (unused-variable)
Raw output
varats/varats/tables/phasar_iter_ide.py:447:12: W0612: Unused variable 'rev_range' (unused-variable)

if (len(report_files) == 0 and len(iia_report_files) == 0):
print(f"Skip {project_name}")
continue

project_cls = get_project_cls_by_name(project_name)

Check warning on line 453 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L453 <612>

Unused variable 'project_cls' (unused-variable)
Raw output
varats/varats/tables/phasar_iter_ide.py:453:12: W0612: Unused variable 'project_cls' (unused-variable)

for report_file, iia_report_file in itertools.zip_longest(
report_files, iia_report_files
):
report: PhasarIterIDEStatsReport = load_phasar_iter_ide_stats_report(

Check failure on line 458 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L458

error: Incompatible types in assignment (expression has type "Optional[PhasarIterIDEStatsReport]", variable has type "PhasarIterIDEStatsReport") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:458:52: error: Incompatible types in assignment (expression has type "Optional[PhasarIterIDEStatsReport]", variable has type "PhasarIterIDEStatsReport")  [assignment]

Check failure on line 458 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L458 <301>

Line too long (85/80) (line-too-long)
Raw output
varats/varats/tables/phasar_iter_ide.py:458:0: C0301: Line too long (85/80) (line-too-long)
report_file
) if report_file is not None else None
iia_report = load_phasar_iter_ide_stats_report(
iia_report_file
) if iia_report_file is not None else None
# print(iia_report)
if report is None:
# print("Have IIA report, but no regular report")
report = iia_report

Check failure on line 467 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L467

error: Statement is unreachable [unreachable]
Raw output
varats/varats/tables/phasar_iter_ide.py:467:21: error: Statement is unreachable  [unreachable]
elif not (iia_report is None):

Check failure on line 468 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L468 <325>

Unnecessary parens after 'not' keyword (superfluous-parens)
Raw output
varats/varats/tables/phasar_iter_ide.py:468:0: C0325: Unnecessary parens after 'not' keyword (superfluous-parens)
# print("Have both reports")
report.merge_with(iia_report)

Check failure on line 470 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L470

error: Call to untyped function "merge_with" in typed context [no-untyped-call]
Raw output
varats/varats/tables/phasar_iter_ide.py:470:21: error: Call to untyped function "merge_with" in typed context  [no-untyped-call]

# print(f"Report: {report}")

if not report.basic_bc_stats:
print(f"No basic stats on {project_name}, skip")
continue

cs_dict = {}
cs_dict.update(self.compute_typestate_stats(report))
cs_dict.update(self.compute_lca_stats(report))
cs_dict.update(self.compute_taint(report))
cs_dict.update(self.compute_iia_stats(report))
cs_data.append(pd.DataFrame.from_records([cs_dict]))

df = pd.concat(cs_data).sort_index()

print("DF:", df, sep='\n')

mean_df = df.mean()
print("Mean:", mean_df, sep='\n')

# (name, 'Runtime', 'JF1'): np.mean(time_speedup_jf1),
# (name, 'Memory', 'JF1'): np.mean(memory_speedup_jf1),
# (name, 'Runtime', 'JF2'): np.mean(time_speedup_jf2),
# (name, 'Memory', 'JF2'): np.mean(memory_speedup_jf2),
# (name, 'Runtime', 'JF3'): np.mean(time_speedup_jf3),
# (name, 'Memory', 'JF3'): np.mean(memory_speedup_jf3),
mindex = pd.MultiIndex.from_tuples([
("Typestate", 'Runtime', 'JF1'),
("Typestate", 'Memory', 'JF1'),
("Typestate", 'Runtime', 'JF2'),
("Typestate", 'Memory', 'JF2'),
("Typestate", 'Runtime', 'JF3'),
("Typestate", 'Memory', 'JF3'),
("LCA", 'Runtime', 'JF1'),
("LCA", 'Memory', 'JF1'),
("LCA", 'Runtime', 'JF2'),
("LCA", 'Memory', 'JF2'),
("LCA", 'Runtime', 'JF3'),
("LCA", 'Memory', 'JF3'),
("Taint", 'Runtime', 'JF1'),
("Taint", 'Memory', 'JF1'),
("Taint", 'Runtime', 'JF2'),
("Taint", 'Memory', 'JF2'),
("Taint", 'Runtime', 'JF3'),
("Taint", 'Memory', 'JF3'),
("IIA", 'Runtime', 'JF1'),
("IIA", 'Memory', 'JF1'),
("IIA", 'Runtime', 'JF2'),
("IIA", 'Memory', 'JF2'),
("IIA", 'Runtime', 'JF3'),
("IIA", 'Memory', 'JF3'),
])
mean_df.index = mindex
print("Grouped Mean:", mean_df.reset_index(), sep='\n')

style: pd.io.formats.style.Styler = df.style
kwargs: tp.Dict[str, tp.Any] = {}
if table_format.is_latex():
# kwargs["column_format"] = "l|rrrrrrr|rrrrrrr|rrrrrrr|rrrrrrr|rrrrrrr|rrrrrrr|"

Check failure on line 530 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L530 <301>

Line too long (92/80) (line-too-long)
Raw output
varats/varats/tables/phasar_iter_ide.py:530:0: C0301: Line too long (92/80) (line-too-long)
kwargs["column_format"] = "l|rrrrrrr|rrrrrrr|rrrrrrr|rrrrrrr|"
kwargs["multicol_align"] = "c|"
# kwargs["multicolumn"] = True
kwargs['position'] = 't'
kwargs[
"caption"
] = """Results of our overall comparision between the two jump-function representations within our newly updated iterative IDESolver. We report the mean runtime of both versions, as well as, the mean speedup $\mathcal{S}$ and it's standard deviation $s$.

Check failure on line 537 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L537 <301>

Line too long (266/80) (line-too-long)
Raw output
varats/varats/tables/phasar_iter_ide.py:537:0: C0301: Line too long (266/80) (line-too-long)

Check warning on line 537 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L537 <1401>

Anomalous backslash in string: '\m'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
Raw output
varats/varats/tables/phasar_iter_ide.py:537:221: W1401: Anomalous backslash in string: '\m'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
$\mathcal{S}$ was computed as the mean over all speedups in the cartesian product of all measurements.

Check warning on line 538 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L538 <1401>

Anomalous backslash in string: '\m'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
Raw output
varats/varats/tables/phasar_iter_ide.py:538:1: W1401: Anomalous backslash in string: '\m'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
"""
style.format(precision=2)

def add_extras(doc: Document) -> None:
doc.packages.append(Package("amssymb"))
doc.append(NoEscape("\setlength{\\tabcolsep}{4pt}"))

Check warning on line 544 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L544 <1401>

Anomalous backslash in string: '\s'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
Raw output
varats/varats/tables/phasar_iter_ide.py:544:33: W1401: Anomalous backslash in string: '\s'. String constant might be missing an r prefix. (anomalous-backslash-in-string)

return dataframe_to_table(
df,
table_format,
style,
wrap_table=wrap_table,
wrap_landscape=True,
margin=0.0,
document_decorator=add_extras,
**kwargs
)

def compute_typestate_stats(self, report: PhasarIterIDEStatsReport):

Check failure on line 557 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L557

error: Function is missing a return type annotation [no-untyped-def]
Raw output
varats/varats/tables/phasar_iter_ide.py:557:5: error: Function is missing a return type annotation  [no-untyped-def]
return self.__compute_delta_comp(
"Typestate", report.new_typestate_nested, report.new_typestate_jf1,
report.new_typestate, report.new_typestate_jf3
)

def compute_taint(self, report: PhasarIterIDEStatsReport):

Check failure on line 563 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L563

error: Function is missing a return type annotation [no-untyped-def]
Raw output
varats/varats/tables/phasar_iter_ide.py:563:5: error: Function is missing a return type annotation  [no-untyped-def]
return self.__compute_delta_comp(
"Taint", report.new_taint_nested, report.new_taint_jf1,
report.new_taint, report.new_taint_jf3
)

def compute_lca_stats(self, report: PhasarIterIDEStatsReport):

Check failure on line 569 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L569

error: Function is missing a return type annotation [no-untyped-def]
Raw output
varats/varats/tables/phasar_iter_ide.py:569:5: error: Function is missing a return type annotation  [no-untyped-def]
return self.__compute_delta_comp(
"LCA", report.new_lca_nested, report.new_lca_jf1, report.new_lca,
report.new_lca_jf3
)

def compute_iia_stats(self, report: PhasarIterIDEStatsReport):

Check failure on line 575 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L575

error: Function is missing a return type annotation [no-untyped-def]
Raw output
varats/varats/tables/phasar_iter_ide.py:575:5: error: Function is missing a return type annotation  [no-untyped-def]
return self.__compute_delta_comp(
"IIA", report.new_iia_nested, report.new_iia_jf1, report.new_iia,
report.new_iia_jf3
)

@staticmethod
def __compute_speedups(
old_measurements: tp.List[float], new_measurements: tp.List[float]
) -> tp.List[float]:
ret = list(
filter(
lambda x: not math.isnan(x),
map(
lambda x: round(x[0] / x[1], 3),
itertools.product(old_measurements, new_measurements)
)
)
)
if len(ret) == 0:
return [float("NaN")]
return ret

def __compute_delta_comp(

Check failure on line 598 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L598

error: Function is missing a return type annotation [no-untyped-def]
Raw output
varats/varats/tables/phasar_iter_ide.py:598:5: error: Function is missing a return type annotation  [no-untyped-def]
self, name: str, old_time_report: tp.Optional[TimeReportAggregate],
jf1_time_report: tp.Optional[TimeReportAggregate],
jf2_time_report: tp.Optional[TimeReportAggregate],
jf3_time_report: tp.Optional[TimeReportAggregate]
):
time_speedup_jf1 = np.nan
time_speedup_jf2 = np.nan
time_speedup_jf3 = np.nan

memory_speedup_jf1 = np.nan
memory_speedup_jf2 = np.nan
memory_speedup_jf3 = np.nan

if old_time_report and jf1_time_report:
time_speedup_jf1 = PhasarIterIDEMeanSpeedup.__compute_speedups(

Check failure on line 613 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L613

error: Incompatible types in assignment (expression has type "list[float]", variable has type "float") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:613:32: error: Incompatible types in assignment (expression has type "list[float]", variable has type "float")  [assignment]
old_time_report.measurements_wall_clock_time,
jf1_time_report.measurements_wall_clock_time
)
memory_speedup_jf1 = PhasarIterIDEMeanSpeedup.__compute_speedups(

Check failure on line 617 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L617

error: Incompatible types in assignment (expression has type "list[float]", variable has type "float") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:617:34: error: Incompatible types in assignment (expression has type "list[float]", variable has type "float")  [assignment]
all_from_kbytes_to_mbytes(old_time_report.max_resident_sizes),

Check failure on line 618 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L618

error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]" [arg-type]
Raw output
varats/varats/tables/phasar_iter_ide.py:618:43: error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]"  [arg-type]

Check failure on line 618 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L618

note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
Raw output
varats/varats/tables/phasar_iter_ide.py:618:43: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance

Check failure on line 618 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L618

note: Consider using "Sequence" instead, which is covariant
Raw output
varats/varats/tables/phasar_iter_ide.py:618:43: note: Consider using "Sequence" instead, which is covariant
all_from_kbytes_to_mbytes(jf1_time_report.max_resident_sizes)

Check failure on line 619 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L619

error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]" [arg-type]
Raw output
varats/varats/tables/phasar_iter_ide.py:619:43: error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]"  [arg-type]

Check failure on line 619 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L619

note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
Raw output
varats/varats/tables/phasar_iter_ide.py:619:43: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance

Check failure on line 619 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L619

note: Consider using "Sequence" instead, which is covariant
Raw output
varats/varats/tables/phasar_iter_ide.py:619:43: note: Consider using "Sequence" instead, which is covariant
)

if old_time_report and jf2_time_report:
time_speedup_jf2 = PhasarIterIDEMeanSpeedup.__compute_speedups(

Check failure on line 623 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L623

error: Incompatible types in assignment (expression has type "list[float]", variable has type "float") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:623:32: error: Incompatible types in assignment (expression has type "list[float]", variable has type "float")  [assignment]
old_time_report.measurements_wall_clock_time,
jf2_time_report.measurements_wall_clock_time
)
memory_speedup_jf2 = PhasarIterIDEMeanSpeedup.__compute_speedups(

Check failure on line 627 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L627

error: Incompatible types in assignment (expression has type "list[float]", variable has type "float") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:627:34: error: Incompatible types in assignment (expression has type "list[float]", variable has type "float")  [assignment]
all_from_kbytes_to_mbytes(old_time_report.max_resident_sizes),

Check failure on line 628 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L628

error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]" [arg-type]
Raw output
varats/varats/tables/phasar_iter_ide.py:628:43: error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]"  [arg-type]

Check failure on line 628 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L628

note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
Raw output
varats/varats/tables/phasar_iter_ide.py:628:43: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance

Check failure on line 628 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L628

note: Consider using "Sequence" instead, which is covariant
Raw output
varats/varats/tables/phasar_iter_ide.py:628:43: note: Consider using "Sequence" instead, which is covariant
all_from_kbytes_to_mbytes(jf2_time_report.max_resident_sizes)

Check failure on line 629 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L629

error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]" [arg-type]
Raw output
varats/varats/tables/phasar_iter_ide.py:629:43: error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]"  [arg-type]

Check failure on line 629 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L629

note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
Raw output
varats/varats/tables/phasar_iter_ide.py:629:43: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance

Check failure on line 629 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L629

note: Consider using "Sequence" instead, which is covariant
Raw output
varats/varats/tables/phasar_iter_ide.py:629:43: note: Consider using "Sequence" instead, which is covariant
)

if old_time_report and jf3_time_report:
time_speedup_jf3 = PhasarIterIDEMeanSpeedup.__compute_speedups(

Check failure on line 633 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L633

error: Incompatible types in assignment (expression has type "list[float]", variable has type "float") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:633:32: error: Incompatible types in assignment (expression has type "list[float]", variable has type "float")  [assignment]
old_time_report.measurements_wall_clock_time,
jf3_time_report.measurements_wall_clock_time
)
memory_speedup_jf3 = PhasarIterIDEMeanSpeedup.__compute_speedups(

Check failure on line 637 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L637

error: Incompatible types in assignment (expression has type "list[float]", variable has type "float") [assignment]
Raw output
varats/varats/tables/phasar_iter_ide.py:637:34: error: Incompatible types in assignment (expression has type "list[float]", variable has type "float")  [assignment]
all_from_kbytes_to_mbytes(old_time_report.max_resident_sizes),

Check failure on line 638 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L638

error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]" [arg-type]
Raw output
varats/varats/tables/phasar_iter_ide.py:638:43: error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]"  [arg-type]

Check failure on line 638 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L638

note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
Raw output
varats/varats/tables/phasar_iter_ide.py:638:43: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance

Check failure on line 638 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L638

note: Consider using "Sequence" instead, which is covariant
Raw output
varats/varats/tables/phasar_iter_ide.py:638:43: note: Consider using "Sequence" instead, which is covariant
all_from_kbytes_to_mbytes(jf3_time_report.max_resident_sizes)

Check failure on line 639 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L639

error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]" [arg-type]
Raw output
varats/varats/tables/phasar_iter_ide.py:639:43: error: Argument 1 to "all_from_kbytes_to_mbytes" has incompatible type "list[int]"; expected "list[float]"  [arg-type]

Check failure on line 639 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L639

note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
Raw output
varats/varats/tables/phasar_iter_ide.py:639:43: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance

Check failure on line 639 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L639

note: Consider using "Sequence" instead, which is covariant
Raw output
varats/varats/tables/phasar_iter_ide.py:639:43: note: Consider using "Sequence" instead, which is covariant
)

return {
(name, 'Runtime', 'JF1'): np.mean(time_speedup_jf1),
(name, 'Memory', 'JF1'): np.mean(memory_speedup_jf1),
(name, 'Runtime', 'JF2'): np.mean(time_speedup_jf2),
(name, 'Memory', 'JF2'): np.mean(memory_speedup_jf2),
(name, 'Runtime', 'JF3'): np.mean(time_speedup_jf3),
(name, 'Memory', 'JF3'): np.mean(memory_speedup_jf3),
}

# return {
# (name, 'JF1'): {
# 'Runtime': np.mean(time_speedup_jf1),
# 'Memory': np.mean(memory_speedup_jf1),
# },
# (name, 'JF2'): {
# 'Runtime': np.mean(time_speedup_jf2),
# 'Memory': np.mean(memory_speedup_jf2),
# },
# (name, 'JF3'): {
# 'Runtime': np.mean(time_speedup_jf3),
# 'Memory': np.mean(memory_speedup_jf3),
# },
# }


class PhasarIterIDEStatsWL(Table, table_name="phasar-iter-ide-stats-wl"):

Check failure on line 667 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L667 <115>

Missing class docstring (missing-class-docstring)
Raw output
varats/varats/tables/phasar_iter_ide.py:667:0: C0115: Missing class docstring (missing-class-docstring)

def get_time_and_mem(self, report_entry):

Check failure on line 669 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L669

error: Function is missing a type annotation [no-untyped-def]
Raw output
varats/varats/tables/phasar_iter_ide.py:669:5: error: Function is missing a type annotation  [no-untyped-def]

Check failure on line 669 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L669 <116>

Missing function or method docstring (missing-function-docstring)
Raw output
varats/varats/tables/phasar_iter_ide.py:669:4: C0116: Missing function or method docstring (missing-function-docstring)
Expand Down Expand Up @@ -1057,6 +1303,17 @@ def generate(self) -> tp.List[Table]:
]


class PhasarIterIDEStatsGenerator(

Check failure on line 1306 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / mypy

[mypy] varats/varats/tables/phasar_iter_ide.py#L1306

error: Name "PhasarIterIDEStatsGenerator" already defined on line 1289 [no-redef]
Raw output
varats/varats/tables/phasar_iter_ide.py:1306:1: error: Name "PhasarIterIDEStatsGenerator" already defined on line 1289  [no-redef]

Check failure on line 1306 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L1306 <102>

class already defined line 1289 (function-redefined)
Raw output
varats/varats/tables/phasar_iter_ide.py:1306:0: E0102: class already defined line 1289 (function-redefined)
TableGenerator, generator_name="phasar-iter-ide-means", options=[]
):
"""TODO: """

def generate(self) -> tp.List[Table]:
return [
PhasarIterIDEMeanSpeedup(self.table_config, **self.table_kwargs),
]


class PhasarIterIDEOldVSNew(Table, table_name="phasar-iter-ide-old-new"):

Check failure on line 1317 in varats/varats/tables/phasar_iter_ide.py

View workflow job for this annotation

GitHub Actions / pylint

[pylint] varats/varats/tables/phasar_iter_ide.py#L1317 <115>

Missing class docstring (missing-class-docstring)
Raw output
varats/varats/tables/phasar_iter_ide.py:1317:0: C0115: Missing class docstring (missing-class-docstring)

def tabulate(self, table_format: TableFormat, wrap_table: bool) -> str:
Expand Down

0 comments on commit 4e2d0b8

Please sign in to comment.