Skip to content

Commit 140df62

Browse files
authored
Merge pull request #2321 from Pinata-Consulting/python-fixes
genMetrics.py: fix warnings for Python escape sequences
2 parents 48b8790 + 216f516 commit 140df62

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

flow/util/genMetrics.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,17 @@ def extractGnuTime(prefix, jsonFile, file):
143143
extractTagFromFile(
144144
prefix + "__runtime__total",
145145
jsonFile,
146-
"^Elapsed time: (\S+)\[h:\]min:sec.*",
146+
"^Elapsed time: (\\S+)\\[h:\\]min:sec.*",
147147
file,
148148
)
149149
extractTagFromFile(
150150
prefix + "__cpu__total",
151151
jsonFile,
152-
"^Elapsed time:.*CPU time: user (\S+) .*",
152+
"^Elapsed time:.*CPU time: user (\\S+) .*",
153153
file,
154154
)
155155
extractTagFromFile(
156-
prefix + "__mem__peak", jsonFile, "^Elapsed time:.*Peak memory: (\S+)KB.", file
156+
prefix + "__mem__peak", jsonFile, "^Elapsed time:.*Peak memory: (\\S+)KB.", file
157157
)
158158

159159

@@ -256,14 +256,14 @@ def extract_metrics(cwd, platform, design, flow_variant, output, hier_json):
256256
extractTagFromFile(
257257
"synth__design__instance__count__stdcell",
258258
metrics_dict,
259-
"Number of cells: +(\S+)",
259+
"Number of cells: +(\\S+)",
260260
rptPath + "/synth_stat.txt",
261261
)
262262

263263
extractTagFromFile(
264264
"synth__design__instance__area__stdcell",
265265
metrics_dict,
266-
"Chip area for (?:top )?module.*: +(\S+)",
266+
"Chip area for (?:top )?module.*: +(\\S+)",
267267
rptPath + "/synth_stat.txt",
268268
)
269269

@@ -291,7 +291,7 @@ def extract_metrics(cwd, platform, design, flow_variant, output, hier_json):
291291
extractTagFromFile(
292292
"globalroute__timing__clock__slack",
293293
metrics_dict,
294-
"^\[INFO FLW-....\] Clock .* slack (\S+)",
294+
"^\\[INFO FLW-....\\] Clock .* slack (\\S+)",
295295
logPath + "/5_1_grt.log",
296296
)
297297

@@ -301,7 +301,7 @@ def extract_metrics(cwd, platform, design, flow_variant, output, hier_json):
301301
extractTagFromFile(
302302
"finish__timing__wns_percent_delay",
303303
metrics_dict,
304-
baseRegEx.format("finish slack div critical path delay", "(\S+)"),
304+
baseRegEx.format("finish slack div critical path delay", "(\\S+)"),
305305
rptPath + "/6_finish.rpt",
306306
)
307307

0 commit comments

Comments
 (0)