* [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/reports/
@ 2012-04-09 22:07 Andrea Arteaga
0 siblings, 0 replies; only message in thread
From: Andrea Arteaga @ 2012-04-09 22:07 UTC (permalink / raw
To: gentoo-commits
commit: b07510cb5bc9875124275fd3a4edd51a0bddddbb
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Apr 9 22:04:43 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Apr 9 22:04:43 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=b07510cb
Added cache information in report.
---
numbench/reports/html.py | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/numbench/reports/html.py b/numbench/reports/html.py
index 0ab9ba4..227de57 100644
--- a/numbench/reports/html.py
+++ b/numbench/reports/html.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-import time
-from os.path import join as pjoin, basename
+import os, time
+from os.path import join as pjoin, basename, exists
from xml.sax.saxutils import escape as xmlescape
from .. import benchconfig as cfg
@@ -81,6 +81,19 @@ h1, h2, .plot, .descr, .info {
mem = l.split(':',1)[1].strip()
if mem:
self.content += '<p class="info">Total memory: ' + mem + '</p>'
+
+ # Information regarding the caches
+ cachedir = '/sys/devices/system/cpu/cpu0/cache'
+ if exists(cachedir):
+ self.content += '<p class="info">Caches:<br />'
+ for i in os.listdir(cachedir):
+ cdir = pjoin(cachedir, i)
+ ctxt = 'L' + file(pjoin(cdir, 'level')).read().strip()
+ ctxt += ' ' + file(pjoin(cdir, 'type')).read().strip()
+ ctxt += ': ' + file(pjoin(cdir, 'size')).read().strip()[:-1]
+ self.content += ctxt + ' kB<br />'
+ self.content += '</p>'
+
# Input file
self.content += '<div class="inputfile">Input file: ' + \
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-09 22:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 22:07 [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/reports/ Andrea Arteaga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox