Skip to content

Commit 1aa1641

Browse files
committed
Added initial implementation of WRROC generator from gathered metrics.
1 parent ab7b520 commit 1aa1641

6 files changed

Lines changed: 443 additions & 7 deletions

File tree

installation/dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ ruff
22
pre-commit
33
build
44
twine
5+
roc-validator
56
mypy >= 1.1.1
67
-r mypy-requirements.txt
78
pytest

installation/requirements-analytics.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ pandas
22
networkx
33
matplotlib
44
adjustText
5+
rocrate

treecript/aggregator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ def metrics_aggregator(
459459
tdp_in_w: "float",
460460
group_by_process_name: "Optional[str]" = None,
461461
) -> "None":
462-
pids, num_cpu_cores, sampling_period_seconds = metrics_parser(
463-
series_dir, outputs_dir, group_by_process_name=group_by_process_name
462+
reference_pid, pids, num_cpu_cores, sampling_period_seconds = metrics_parser(
463+
series_dir, group_by_process_name=group_by_process_name
464464
)
465465

466466
sampling_period_milliseconds = int(round(sampling_period_seconds * 1000.0))

treecript/parser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,8 @@ def process_command(command: "Sequence[str]") -> "str":
112112

113113
def metrics_parser(
114114
series_dir: "pathlib.Path",
115-
outputs_dir: "pathlib.Path",
116115
group_by_process_name: "Optional[str]" = None,
117-
) -> "Tuple[pd.DataFrame, int, float]":
116+
) -> "Tuple[float, pd.DataFrame, int, float]":
118117
if not series_dir.is_dir():
119118
logger.error(f"Path {series_dir.as_posix()} is not a directory")
120119
raise Exception()
@@ -216,7 +215,7 @@ def metrics_parser(
216215
pids["full_stats"] = pd.array(full_stats, dtype="object", copy=False)
217216
pids["subtree_root"] = subtree_root
218217

219-
return pids, num_cpu_cores, sampling_period_seconds
218+
return reference_pid, pids, num_cpu_cores, sampling_period_seconds
220219

221220

222221
def timedelta_full_formatter(td: "pd.Timedelta") -> "str":

treecript/plot_graph.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,8 @@ def plot_graphs(
236236
outputs_dir: "pathlib.Path",
237237
group_by_process_name: "Optional[str]" = None,
238238
) -> "None":
239-
pids, num_cpu_cores, sampling_period_seconds = metrics_parser(
239+
reference_pid, pids, num_cpu_cores, sampling_period_seconds = metrics_parser(
240240
series_dir,
241-
outputs_dir,
242241
group_by_process_name=group_by_process_name,
243242
)
244243

0 commit comments

Comments
 (0)