[commit: ghc] wip/perf-testsuite: Added initial metric comparison tooling (864ed76)
git at git.haskell.org
git at git.haskell.org
Thu Aug 10 08:44:04 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/perf-testsuite
Link : http://ghc.haskell.org/trac/ghc/changeset/864ed7684ad5bdd569570c9a72b0516e2bd556b4/ghc
>---------------------------------------------------------------
commit 864ed7684ad5bdd569570c9a72b0516e2bd556b4
Author: Jared Weakly <jweakly at pdx.edu>
Date: Thu Jul 20 17:30:21 2017 -0700
Added initial metric comparison tooling
>---------------------------------------------------------------
864ed7684ad5bdd569570c9a72b0516e2bd556b4
testsuite/driver/runtests.py | 9 +++------
testsuite/driver/testutil.py | 10 ++++++----
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 796a2c5..540f090 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -307,14 +307,11 @@ else:
summary(t, sys.stdout, config.no_print_summary)
- # This here is loading up all of the git notes into memory.
- # It's most likely in the wrong spot and I haven't fully fleshed out
- # where exactly I'm putting this and how I'm refactoring the performance
- # test running logic.
- # Currently this is useful for debugging, at least.
+ # Write our accumulated metrics into the git notes for this commit.
if config.use_git_notes:
note = subprocess.check_output(["git","notes","--ref=perf","append","-m", "\n".join(config.accumulate_metrics)])
- parse_git_notes('perf') # Should this be hardcoded? Most likely not...
+ # v-- This is in a nonsensical area. It should be happening before all of the tests are even run.
+ # parse_git_notes('perf') # Should it even be happening in the test-driver logic anymore?
# This here is loading up all of the git notes into memory.
# It's most likely in the wrong spot and I haven't fully fleshed out
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py
index 1fe1c20..bf9ed2a 100644
--- a/testsuite/driver/testutil.py
+++ b/testsuite/driver/testutil.py
@@ -3,7 +3,6 @@ import os
import platform
import subprocess
import shutil
-
import threading
def strip_quotes(s):
@@ -50,14 +49,17 @@ def lndir(srcdir, dstdir):
# This function allows one to read in git notes from the commandline
# and then breaks it into a list of dictionaries that can be parsed
# later on in the testing functions.
-def parse_git_notes(namespace):
+# I wanted to put it in perf_notes.py but couldn't figure out a nice way to do that.
+def parse_git_notes(namespace, commits=['HEAD']):
logFields = ['TEST_ENV','TEST','WAY','METRIC','VALUE']
- log = subprocess.check_output(['git', 'notes', '--ref=' + namespace, 'show']).decode('utf-8')
+ log = ""
+ for commit in commits:
+ log += subprocess.check_output(['git', 'notes', '--ref=' + namespace, 'show', commit]).decode('utf-8')
+
log = log.strip('\n').split('\n')
log = [line.strip('\t').split('\t') for line in log]
log = [dict(zip(logFields, field)) for field in log]
return log
- # Add a print statement here if you want to see what's being loaded from git notes.
# On Windows, os.symlink is not defined with Python 2.7, but is in Python 3
# when using msys2, as GHC does. Unfortunately, only Administrative users have
More information about the ghc-commits
mailing list