From 85b35215b89c4362542783472df1ac06dda9ede2 Mon Sep 17 00:00:00 2001 From: Levente Meszaros Date: Tue, 3 Sep 2024 14:26:31 +0200 Subject: [PATCH] python: Fixed bug introduced earlier with search/replace. --- python/inet/test/validation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/inet/test/validation.py b/python/inet/test/validation.py index c0b3e161b1e..2c89a686e9a 100644 --- a/python/inet/test/validation.py +++ b/python/inet/test/validation.py @@ -109,7 +109,7 @@ def compute_asynchronousshaper_icct_endtoend_delay_from_simulation_results(**kwa filter_expression = """type =~ scalar AND name =~ meanBitLifeTimePerPacket:histogram:max""" df = read_result_files(inet_project.get_full_path("tests/validation/tsn/trafficshaping/asynchronousshaper/icct/results/*.sca"), filter_expression=filter_expression, include_fields_as_scalars=True) df = get_scalars(df) - df["name"] = df["name"].map(lambda name: re.sub(r".*(min|max)", "\1", name)) + df["name"] = df["name"].map(lambda name: re.sub(r".*(min|max)", "\\1", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*N6.app\[[0-4]\].*", "Flow 4, Class A", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*N6.app\[[5-9]\].*", "Flow 5, Class B", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*N7.app\[[0-9]\].*", "Flow 1, CDT", name)) @@ -155,7 +155,7 @@ def compute_asynchronousshaper_core4inet_endtoend_delay_from_simulation_results( filter_expression = """type =~ scalar AND (name =~ meanBitLifeTimePerPacket:histogram:min OR name =~ meanBitLifeTimePerPacket:histogram:max OR name =~ meanBitLifeTimePerPacket:histogram:mean OR name =~ meanBitLifeTimePerPacket:histogram:stddev)""" df = read_result_files(inet_project.get_full_path("tests/validation/tsn/trafficshaping/asynchronousshaper/core4inet/results/*.sca"), filter_expression=filter_expression, include_fields_as_scalars=True) df = get_scalars(df) - df["name"] = df["name"].map(lambda name: re.sub(r".*(min|max|mean|stddev)", "\1", name)) + df["name"] = df["name"].map(lambda name: re.sub(r".*(min|max|mean|stddev)", "\\1", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*app\[0\].*", "Best effort", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*app\[1\].*", "Medium", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*app\[2\].*", "High", name)) @@ -222,7 +222,7 @@ def compute_creditbasedshaper_endtoend_delay_from_simulation_results(**kwargs): filter_expression = """type =~ scalar AND (name =~ meanBitLifeTimePerPacket:histogram:min OR name =~ meanBitLifeTimePerPacket:histogram:max OR name =~ meanBitLifeTimePerPacket:histogram:mean OR name =~ meanBitLifeTimePerPacket:histogram:stddev)""" df = read_result_files(inet_project.get_full_path("tests/validation/tsn/trafficshaping/creditbasedshaper/results/*.sca"), filter_expression=filter_expression, include_fields_as_scalars=True) df = get_scalars(df) - df["name"] = df["name"].map(lambda name: re.sub(r".*(min|max|mean|stddev)", "\1", name)) + df["name"] = df["name"].map(lambda name: re.sub(r".*(min|max|mean|stddev)", "\\1", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*app\[0\].*", "Best effort", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*app\[1\].*", "Medium", name)) df["module"] = df["module"].map(lambda name: re.sub(r".*app\[2\].*", "High", name))