diff --git a/.github/workflows/benchmarking.yml b/.github/workflows/benchmarking.yml index 943c972fcb..729f88aef2 100644 --- a/.github/workflows/benchmarking.yml +++ b/.github/workflows/benchmarking.yml @@ -321,11 +321,6 @@ jobs: total_seconds=$((total_seconds + ${BASH_REMATCH[1]#0} * 3600)) fi - # Check for minutes (m) - if [[ "$duration" =~ ([0-9]+)m ]]; then - total_seconds=$((total_seconds + ${BASH_REMATCH[1]#0} * 60)) - fi - # Check for seconds (s) if [[ "$duration" =~ ([0-9]+)s ]]; then total_seconds=$((total_seconds + ${BASH_REMATCH[1]#0})) @@ -334,6 +329,12 @@ jobs: # Check for milliseconds (ms) (if applicable) if [[ "$duration" =~ ([0-9]+)ms ]]; then total_seconds=$((total_seconds + ${BASH_REMATCH[1]#0} / 1000)) + duration=${duration/${BASH_REMATCH[0]}/} # need to remove it to avoid double counting with m + fi + + # Check for minutes (m) - must be checked after ms because m is contained in ms + if [[ "$duration" =~ ([0-9]+)m ]]; then + total_seconds=$((total_seconds + ${BASH_REMATCH[1]#0} * 60)) fi echo $total_seconds