summaryrefslogtreecommitdiffstats
path: root/QMTest
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-12-10 13:36:10 (GMT)
committerSteven Knight <knight@baldmt.com>2009-12-10 13:36:10 (GMT)
commitc7eb96a52ec5b48b7aea06c82444f2b10e078213 (patch)
tree06f6aa32a2c460e500726e6e2ee22c4310ebf3c7 /QMTest
parent17879c1de6f589009c781e7f36e8a6a95b45c33f (diff)
downloadSCons-c7eb96a52ec5b48b7aea06c82444f2b10e078213.zip
SCons-c7eb96a52ec5b48b7aea06c82444f2b10e078213.tar.gz
SCons-c7eb96a52ec5b48b7aea06c82444f2b10e078213.tar.bz2
Record memory in kbytest, not bytes.
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestSCons.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py
index c172632..8ecc8b2 100644
--- a/QMTest/TestSCons.py
+++ b/QMTest/TestSCons.py
@@ -958,23 +958,29 @@ print py_ver
class Graph:
- def __init__(self, name, units, expression, sort=None):
+ def __init__(self, name, units, expression, sort=None, convert=None):
+ if convert is None:
+ convert = lambda x: x
self.name = name
self.units = units
self.expression = re.compile(expression)
self.sort = sort
+ self.convert = convert
GraphList = [
Graph('TimeSCons-elapsed', 'seconds',
r'TimeSCons elapsed time:\s+([\d.]+)',
sort=0),
- Graph('memory-initial', 'bytes',
- r'Memory before reading SConscript files:\s+(\d+)'),
- Graph('memory-prebuild', 'bytes',
- r'Memory before building targets:\s+(\d+)'),
- Graph('memory-final', 'bytes',
- r'Memory after building targets:\s+(\d+)'),
+ Graph('memory-initial', 'kbytes',
+ r'Memory before reading SConscript files:\s+(\d+)',
+ convert=lambda s: int(s) / 1024),
+ Graph('memory-prebuild', 'kbytes',
+ r'Memory before building targets:\s+(\d+)',
+ convert=lambda s: int(s) / 1024),
+ Graph('memory-final', 'kbytes',
+ r'Memory after building targets:\s+(\d+)',
+ convert=lambda s: int(s) / 1024),
Graph('time-sconscript', 'seconds',
r'Total SConscript file execution time:\s+([\d.]+) seconds'),
@@ -1081,7 +1087,10 @@ class TimeSCons(TestSCons):
for graph in GraphList:
m = graph.expression.search(input)
if m:
- self.trace(graph.name, trace, m.group(1), graph.units)
+ self.trace(graph.name,
+ trace,
+ graph.convert(m.group(1)),
+ graph.units)
def help(self, *args, **kw):
"""