| OLD | NEW |
| 1 import os, re | 1 import os, re |
| 2 from autotest_lib.client.bin import test, utils | 2 from autotest_lib.client.bin import test, utils |
| 3 from autotest_lib.client.common_lib import error | 3 from autotest_lib.client.common_lib import error |
| 4 | 4 |
| 5 | 5 |
| 6 class unixbench(test.test): | 6 class unixbench(test.test): |
| 7 version = 2 | 7 version = 2 |
| 8 | 8 |
| 9 def initialize(self): | 9 def initialize(self): |
| 10 self.job.require_gcc() | 10 self.job.require_gcc() |
| 11 self.err = None | 11 self.err = None |
| 12 | 12 |
| 13 | 13 |
| 14 # http://www.tux.org/pub/tux/niemi/unixbench/unixbench-4.1.0.tgz | 14 # http://www.tux.org/pub/tux/niemi/unixbench/unixbench-4.1.0.tgz |
| 15 def setup(self, tarball = 'unixbench-4.1.0.tar.bz2'): | 15 def setup(self, tarball = 'unixbench-4.1.0.tar.bz2'): |
| 16 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 16 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
| 17 utils.extract_tarball_to_dir(tarball, self.srcdir) | 17 utils.extract_tarball_to_dir(tarball, self.srcdir) |
| 18 os.chdir(self.srcdir) | 18 os.chdir(self.srcdir) |
| 19 | 19 |
| 20 utils.system('patch -p1 < ../unixbench.patch') | 20 utils.system('patch -p1 < ../unixbench.patch') |
| 21 utils.system('patch -p1 < ../Makefile.patch') | 21 utils.system('patch -p1 < ../Makefile.patch') |
| 22 utils.make() | 22 utils.system('make') |
| 23 utils.system('rm pgms/select') | 23 utils.system('rm pgms/select') |
| 24 | 24 |
| 25 | 25 |
| 26 def run_once(self, args='', stepsecs=0): | 26 def run_once(self, args='', stepsecs=0): |
| 27 vars = ('TMPDIR=\"%s\" RESULTDIR=\"%s\" FLAVOR=Linux' % | 27 vars = ('TMPDIR=\"%s\" RESULTDIR=\"%s\" FLAVOR=Linux' % |
| 28 (self.tmpdir, self.resultsdir)) | 28 (self.tmpdir, self.resultsdir)) |
| 29 if stepsecs: | 29 if stepsecs: |
| 30 # change time per subtest from unixbench's defaults of | 30 # change time per subtest from unixbench's defaults of |
| 31 # 10 secs for small tests, 30 secs for bigger tests | 31 # 10 secs for small tests, 30 secs for bigger tests |
| 32 vars += ' systime=%i looper=%i seconds=%i'\ | 32 vars += ' systime=%i looper=%i seconds=%i'\ |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 File Copy 256 bufsize 500 maxblocks 1655.0 143989.0 870.0 | 130 File Copy 256 bufsize 500 maxblocks 1655.0 143989.0 870.0 |
| 131 File Copy 4096 bufsize 8000 maxblocks 5800.0 793041.0 1367.3 | 131 File Copy 4096 bufsize 8000 maxblocks 5800.0 793041.0 1367.3 |
| 132 Pipe Throughput 12440.0 1048491.9 842.8 | 132 Pipe Throughput 12440.0 1048491.9 842.8 |
| 133 Pipe-based Context Switching 4000.0 300778.3 751.9 | 133 Pipe-based Context Switching 4000.0 300778.3 751.9 |
| 134 Process Creation 126.0 11508.6 913.4 | 134 Process Creation 126.0 11508.6 913.4 |
| 135 Shell Scripts (8 concurrent) 6.0 1109.0 1848.3 | 135 Shell Scripts (8 concurrent) 6.0 1109.0 1848.3 |
| 136 System Call Overhead 15000.0 1427272.7 951.5 | 136 System Call Overhead 15000.0 1427272.7 951.5 |
| 137 ========= | 137 ========= |
| 138 FINAL SCORE 902.1 | 138 FINAL SCORE 902.1 |
| 139 """ | 139 """ |
| OLD | NEW |