Skip to content

Commit

Permalink
python: Fixed bug introduced earlier with search/replace.
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Sep 3, 2024
1 parent f157a18 commit 85b3521
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/inet/test/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 85b3521

Please sign in to comment.