Skip to content

Commit

Permalink
fix parsing human time output like "50m37s" (#10001)
Browse files Browse the repository at this point in the history
## Problem

In ingest_benchmark.yml workflow we use pgcopydb tool to migrate
project.
pgcopydb logs human time.

Our parsing of the human time doesn't work for times like "50m37s".

[Example
workflow](https://github.com/neondatabase/neon/actions/runs/12145539948/job/33867418065#step:10:479)

contains "57m45s"

but we
[reported](https://github.com/neondatabase/neon/actions/runs/12145539948/job/33867418065#step:10:500)
only the seconds part: 
45.000 s


## Summary of changes

add a regex pattern for Minute/Second combination
  • Loading branch information
Bodobolero authored and awarus committed Dec 5, 2024
1 parent 709b8cd commit 33790d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_runner/performance/test_perf_ingest_using_pgcopydb.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def parse_log_and_report_metrics(
for metric_name, pattern in metric_patterns.items():
if pattern.search(line):
# Extract duration and convert it to seconds
duration_match = re.search(r"\d+h\d+m|\d+s|\d+ms|\d+\.\d+s", line)
duration_match = re.search(r"\d+h\d+m|\d+m\d+s|\d+s|\d+ms|\d+\.\d+s", line)
if duration_match:
duration_str = duration_match.group(0)
parts = re.findall(r"\d+[a-zA-Z]+", duration_str)
Expand Down

0 comments on commit 33790d1

Please sign in to comment.