Add the installation of fio into KloudBuster image

Change-Id: I5571234d8a1bce6245b2f85b487b09a6a68fa130
This commit is contained in:
Yichen Wang 2016-01-07 22:53:05 -08:00
parent 8d96cc7b05
commit b15484d929
3 changed files with 20 additions and 16 deletions

View File

@ -12,3 +12,7 @@ nuttcp:
python-pip:
python-dev:
redis-server:
xfsprogs:
zlib1g-dev:
libaio1:
libaio-dev:

View File

@ -64,7 +64,6 @@ pip install redis
cd /tmp
git clone git://github.com/HdrHistogram/HdrHistogram_c.git
cd HdrHistogram_c
git reset --hard cf711d06d16cf4057f260a4b656fcddd110a1b7a
cmake .
make install
@ -78,6 +77,14 @@ mv wrk /usr/local/bin/wrk2
# Move the HdrHistogram library to /usr/lib
mv /usr/local/lib/libhdr_histogram.so /usr/lib/
# Install fio
cd /tmp
FIO='fio-2.3'
wget http://brick.kernel.dk/snaps/$FIO.tar.gz
tar xzf $FIO.tar.gz
cd $FIO
make
mv fio /usr/local/bin/fio
# =================
# KloudBuster Proxy
@ -98,9 +105,8 @@ mv dist/* ../kb_server/public/ui
# =======
# Cleanup
# =======
# Remove HdrHistogram_c and wrk2 builds
rm -rf /tmp/HdrHistogram_c
rm -rf /tmp/wrk2
# Remove HdrHistogram_c, wrk2, and fio builds
rm -rf /tmp/
# Remove KloudBuster Web UI builds
rm -rf /kb_test/kloudbuster/kb_web/node_modules
@ -109,9 +115,14 @@ rm -rf /kb_test/kloudbuster/kb_web/.tmp
# Uninstall unneeded packages
apt-get -y --purge remove libyaml-dev
apt-get -y --purge remove libssl-dev
apt-get -y --purge remove zlib1g-dev
apt-get -y --purge remove libaio-dev
apt-get -y --purge remove python-pip
apt-get -y --purge remove python-dev
apt-get -y --purge remove build-essential
apt-get -y --purge remove cmake
apt-get -y --purge remove npm
apt-get -y --purge remove xfsprogs
apt-get -y --purge autoremove
apt-get -y autoclean

View File

@ -69,18 +69,6 @@ class KBRunner_HTTP(KBRunner):
for key, instance in self.client_dict.items():
self.result[key] = instance.http_client_parser(**self.result[key])
def gen_host_stats(self):
self.host_stats = {}
for vm in self.result.keys():
phy_host = self.client_dict[vm].host
if phy_host not in self.host_stats:
self.host_stats[phy_host] = []
self.host_stats[phy_host].append(self.result[vm])
http_tool = self.client_dict.values()[0].http_tool
for phy_host in self.host_stats:
self.host_stats[phy_host] = http_tool.consolidate_results(self.host_stats[phy_host])
def single_run(self, active_range=None, http_test_only=False):
try:
if not http_test_only:
@ -97,6 +85,7 @@ class KBRunner_HTTP(KBRunner):
LOG.info("Running HTTP Benchmarking...")
self.report = {'seq': 0, 'report': None}
self.result = {}
self.run_http_test(active_range)
# Call the method in corresponding tools to consolidate results