From 96b843177f215dee5db529e52fa8bac87a7aaa75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Fri, 25 Oct 2024 13:14:31 +0200 Subject: [PATCH] Add scoping support to gathering events (#207) --- tools/mapping-tester/gatherstats.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/mapping-tester/gatherstats.py b/tools/mapping-tester/gatherstats.py index b99e4fab..b4477031 100755 --- a/tools/mapping-tester/gatherstats.py +++ b/tools/mapping-tester/gatherstats.py @@ -49,15 +49,19 @@ def statsFromTimings(dir): stats["globalTime"] = row[-1] if row[0] == "initialize": stats["initializeTime"] = row[-1] - if row[0].startswith("initialize/map") and row[0].endswith( - "computeMapping.FromA-MeshToB-Mesh" + parts = row[0].split("/") + event = parts[-1] + if ( + parts[0] == "initialize" + and event.startswith("map") + and event.endswith("computeMapping.FromA-MeshToB-Mesh") ): - computeMappingName = row[0] stats["computeMappingTime"] = row[-1] - if row[0].startswith("advance/map") and row[0].endswith( - "mapData.FromA-MeshToB-Mesh" + if ( + parts[0] == "advance" + and event.startswith("map") + and event.endswith("mapData.FromA-MeshToB-Mesh") ): - mapDataName = row[0] stats["mapDataTime"] = row[-1] except BaseException: pass