-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathebizzy.py
30 lines (22 loc) · 1.06 KB
/
ebizzy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
from autotest.client import utils, test
class ebizzy(test.test):
version = 3
def initialize(self):
self.job.require_gcc()
# http://sourceforge.net/project/downloading.php?group_id=202378&filename=ebizzy-0.3.tar.gz
def setup(self, tarball='ebizzy-0.3.tar.gz'):
tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
utils.extract_tarball_to_dir(tarball, self.srcdir)
os.chdir(self.srcdir)
utils.system('[ -x configure ] && ./configure')
utils.make()
# Note: default we use always mmap()
def run_once(self, args='', num_chunks=1000, chunk_size=512000,
seconds=100, num_threads=100):
# TODO: Write small functions which will choose many of the above
# variables dynamicaly looking at guest's total resources
logfile = os.path.join(self.resultsdir, 'ebizzy.log')
args2 = '-m -n %s -P -R -s %s -S %s -t %s' % (num_chunks, chunk_size,
seconds, num_threads)
args = args + ' ' + args2