From 6a8257127b3dce1f18a650afe6921a34b6c6f5b8 Mon Sep 17 00:00:00 2001 From: liyin Date: Mon, 8 May 2017 09:04:32 +0000 Subject: Delete testcase of rubbos and vstf. JIRA:BOTTLENECK-167 This patch will delete vstf and rubbos testcase code. Include some testcase config file, if there will be someone who want to use this testcase maybe B or C version code will contain those testcase. if you use the D version code to run this two testcase we will info you that: Rubbos testsuite is not updating anymore. This entrance for running Rubbos within Bottlenecks is no longer supported. Change-Id: I04e4042ff3998b3696df2ed47a9ffab6f1620ec3 Signed-off-by: liyin --- .../vstf_scripts/vstf/agent/equalizer/optimize.py | 69 ---------------------- 1 file changed, 69 deletions(-) delete mode 100644 testsuites/vstf/vstf_scripts/vstf/agent/equalizer/optimize.py (limited to 'testsuites/vstf/vstf_scripts/vstf/agent/equalizer/optimize.py') diff --git a/testsuites/vstf/vstf_scripts/vstf/agent/equalizer/optimize.py b/testsuites/vstf/vstf_scripts/vstf/agent/equalizer/optimize.py deleted file mode 100644 index 4579c506..00000000 --- a/testsuites/vstf/vstf_scripts/vstf/agent/equalizer/optimize.py +++ /dev/null @@ -1,69 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -import commands -import re - - -# import pdb -# pdb.set_trace() - -class Optimize(object): - - def __init__(self): - pass - - def bind_cpu(self, cpu_range, thread): - flag, num = commands.getstatusoutput( - 'taskset -pc %s %s' % - (cpu_range, thread)) - return flag - - def catch_thread_info(self): - thread_info = { - 'fwd_vhost': None, - 'src_recv_irq': None, - 'dst_send_irq': None} - # top -H get the usage info - flag, threads_usages = commands.getstatusoutput( - 'top -bH -n1 -c -w 2000') - line_array = threads_usages.split('\n') - # get highest vhost line - for line in line_array: - if re.search('vhost-', line) and self._check_thread_usage(line): - thread_info['fwd_vhost'] = line.split()[0] - break - # get highest irq thread as src_recv_irq thread - for line in line_array: - if re.search('irq/', line) and self._check_thread_usage(line): - thread_info['src_recv_irq'] = line.split()[0] - line_array.remove(line) - break - # get the second highest irq thread as dst_send_irq - for line in line_array: - if re.search('irq/', line) and self._check_thread_usage(line): - thread_info['dst_send_irq'] = line.split()[0] - break - # check the data valid - - for key in thread_info.keys(): - if thread_info[key] is None: - return False, str(thread_info) - return True, str(thread_info) - - def _check_thread_usage(self, line): - try: - usage = line.split()[8] - if float(usage) >= 3.0: - return True - else: - print("[ERROR]The highest thread %s is less than 0.05" % usage) - return False - except: - print("[ERROR]The thread usage get failed.") -- cgit 1.2.3-korg