[commit: ghc] wip/perf-testsuite: Basic metrics collection and command line options working (e793a24)
git at git.haskell.org
git at git.haskell.org
Fri Jul 28 20:33:19 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/perf-testsuite
Link : http://ghc.haskell.org/trac/ghc/changeset/e793a24ec0a05f64e1916a8b230bbea96f3d46a0/ghc
>---------------------------------------------------------------
commit e793a24ec0a05f64e1916a8b230bbea96f3d46a0
Author: Jared Weakly <jweakly at pdx.edu>
Date: Thu Jul 6 17:16:49 2017 -0700
Basic metrics collection and command line options working
>---------------------------------------------------------------
e793a24ec0a05f64e1916a8b230bbea96f3d46a0
testsuite/driver/testlib.py | 1 +
testsuite/driver/testutil.py | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index a5a97fa..3c18738 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1085,6 +1085,7 @@ def stats( name, way, stats_file ):
# Check -t stats info
def checkStats(name, way, stats_file, range_fields):
+
full_name = name + '(' + way + ')'
result = passed()
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py
index 1fe1c20..a2386fe 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,16 @@ 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):
- logFields = ['TEST_ENV','TEST','WAY','METRIC','VALUE']
- log = subprocess.check_output(['git', 'notes', '--ref=' + namespace, 'show']).decode('utf-8')
+# 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, commit='HEAD'):
+ logFields = ['test_env','test','way','metric','value','commit']
+
+ 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]
+ [x.append(commit) for x 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