[commit: ghc] wip/t-12758_circleci_push_perf_notes: Metric Increase: T8766 (e9807ae)
git at git.haskell.org
git at git.haskell.org
Thu Aug 23 14:06:40 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/t-12758_circleci_push_perf_notes
Link : http://ghc.haskell.org/trac/ghc/changeset/e9807ae738fee424b3a76f89c4ed5eebebac65c0/ghc
>---------------------------------------------------------------
commit e9807ae738fee424b3a76f89c4ed5eebebac65c0
Author: David Eichmann <davide at well-typed.com>
Date: Thu Aug 23 14:47:17 2018 +0100
Metric Increase: T8766
Metric Increase 'a' (test_env='asdf'): a b c
Metric Increase (test_env='asdf'): a b c
Metric Increase
(test_env='asdf'): a, b, c
Metric Increase ['a','b', 'c'] (test_env='asdf'): a b c
Metric Increase: a b c
>---------------------------------------------------------------
e9807ae738fee424b3a76f89c4ed5eebebac65c0
testsuite/driver/perf_notes.py | 16 ++++++++--------
testsuite/driver/runtests.py | 2 --
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py
index 6dff446..9273f0f 100644
--- a/testsuite/driver/perf_notes.py
+++ b/testsuite/driver/perf_notes.py
@@ -86,15 +86,15 @@ def parse_allowed_perf_changes(commitMsg):
s = r"(?:\s*\n?\s+)" # Space, possible new line with an indent.
qstr = r"(?:'(?:[^'\\]|\\.)*')" # Quoted string.
qstrCap = r"(?:'((?:[^'\\]|\\.)*)')" # Quoted string. Captures the string without the quotes.
- innerQstrList = rf"(?:{qstr}(?:{s}?,{s}?{qstr})*)?" # Inside of a list of strings.
- qstrList = rf"(?:\[{s}?{innerQstrList}{s}?\])" # A list of strings (using box brackets).
+ innerQstrList = r"(?:"+qstr+r"(?:"+s+r"?,"+s+r"?"+qstr+r")*)?" # Inside of a list of strings.gs.s..
+ qstrList = r"(?:\["+s+r"?"+innerQstrList+s+r"?\])" # A list of strings (using box brackets)..
exp = (r"^Metric"
- + rf"{s}(Increase|Decrease)"
- + rf"{s}?({qstr}|{qstrList})?" # Metric or list of metrics.
- + rf"{s}?(\(" + rf"(?:[^')]|{qstr})*" + r"\))?" # Options surounded in parenthesis. (allow parenthases in quoted strings)
- + rf"{s}?:?" # Optional ":"
- + rf"{s}?((?:(?!\n\n)(?!\n[^\s])(?:.|\n))*)" # Test names. Stop parsing on empty or non-indented new line.
+ +s+r"(Increase|Decrease)"
+ +s+r"?("+qstr+r"|"+qstrList+r")?" # Metric or list of metrics.s..
+ +s+r"?(\(" + r"(?:[^')]|"+qstr+r")*" + r"\))?" # Options surounded in parenthesis. (allow parenthases in quoted strings))
+ +s+r"?:?" # Optional ":"
+ +s+r"?((?:(?!\n\n)(?!\n[^\s])(?:.|\n))*)" # Test names. Stop parsing on empty or non-indented new line.
)
matches = re.findall(exp, commitMsg, re.M)
@@ -105,7 +105,7 @@ def parse_allowed_perf_changes(commitMsg):
changes.setdefault(test, []).append({
'direction': direction,
'metrics': re.findall(qstrCap, metricsStr),
- 'opts': dict(re.findall(rf"(\w+){s}?={s}?{qstrCap}", optsStr))
+ 'opts': dict(re.findall(r"(\w+)"+s+r"?="+s+r"?"+qstrCap, optsStr))
})
return changes
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 3cb7477..ded3472 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -240,8 +240,6 @@ print('Timeout is ' + str(config.timeout))
# Try get allowed performance changes from the git commit.
try:
config.allowed_perf_changes = Perf.get_allowed_perf_changes()
- if config.allowed_perf_changes:
- print('Found ' + str(len(config.allowed_perf_changes)) + ' valid metric change statements from the HEAD git commit message.')
except subprocess.CalledProcessError:
print('Failed to get allowed metric changes from the HEAD git commit message.')
More information about the ghc-commits
mailing list