Skip to content

Commit 28e6713

Browse files
authored
Merge pull request #3760 from The-OpenROAD-Project-staging/fix-update-rules
util: fix for colon metrics
2 parents 4046410 + adc1ee7 commit 28e6713

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

flow/util/genMetrics.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ def extract_metrics(
346346
else:
347347
metrics_dict["total_time"] = str(total)
348348

349+
metrics_dict = {
350+
key.replace(":", "__"): value for key, value in metrics_dict.items()
351+
}
352+
349353
if hier_json:
350354
# Convert the Metrics dictionary to hierarchical format by stripping
351355
# the stage as a 'key'

flow/util/genRuleFile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ def gen_rule_file(
298298
matching_fields.append(pattern)
299299

300300
for field in matching_fields:
301+
# Replace ':' with '__' as the dashboard DB does not accept
302+
# ':' in # field names.
303+
if ":" in field:
304+
field = field.replace(":", "__")
301305
processed_fields.add(field)
302306
if isinstance(metrics[field], str):
303307
print(f"[WARNING] Skipping string field {field} = {metrics[field]}")

0 commit comments

Comments
 (0)