diff options
Diffstat (limited to 'numbench/htmlreport.py')
-rw-r--r-- | numbench/htmlreport.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numbench/htmlreport.py b/numbench/htmlreport.py index 0439aff..39cf38f 100644 --- a/numbench/htmlreport.py +++ b/numbench/htmlreport.py @@ -63,7 +63,8 @@ h1, h2, .plot, .descr, .info { self.content += title + "</h1>" date = time.strftime('%Y-%m-%d, %I:%M %p') self.content += '<p class="info">Generated on ' + date + '</p>' - + + # Information regarding the CPU cpuinfo = file('/proc/cpuinfo', 'r').readlines() cpu = None for l in cpuinfo: @@ -71,7 +72,8 @@ h1, h2, .plot, .descr, .info { cpu = l.split(':',1)[1].strip() if cpu: self.content += '<p class="info">CPU: ' + cpu + '</p>' - + + # Information regarding the memory meminfo = file('/proc/meminfo', 'r').readlines() mem = None for l in meminfo: @@ -79,7 +81,8 @@ h1, h2, .plot, .descr, .info { mem = l.split(':',1)[1].strip() if mem: self.content += '<p class="info">Total memory: ' + mem + '</p>' - + + # Input file self.content += '<div class="inputfile">Input file: ' + \ '<a href="%s">%s</a>' % (basename(inputfile), cfg.inputfile) + \ '<pre>%s</pre></div>' % xmlescape(file(cfg.inputfile, 'r').read()) |