aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/loader
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-07-26 14:30:28 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-07-26 14:32:46 +0800
commit683831e33bab86dd1f8d6844f7fa2aec5e12b171 (patch)
treeb4152dd8054b3ac9048bba98edf3493bb12d68d9 /qtip/loader
parent5bd3241840ff2f2db64f7d5e139d05b011bae941 (diff)
Deprecate plan and metric loader
- qtip test plan is now automaticlly generated by `qtip create`. The original way of loading plans is no longer valid - metric specs are now embedded in qpi spec, no separated loader are required now JIRA: QTIP-258 Change-Id: I768d75b014163ce060faff00f415a1cdc437ce73 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip/loader')
-rw-r--r--qtip/loader/metric.py16
-rw-r--r--qtip/loader/plan.py58
-rw-r--r--qtip/loader/qpi.py3
3 files changed, 0 insertions, 77 deletions
diff --git a/qtip/loader/metric.py b/qtip/loader/metric.py
deleted file mode 100644
index 842fcdbf..00000000
--- a/qtip/loader/metric.py
+++ /dev/null
@@ -1,16 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 ZTE Corp 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
-##############################################################################
-
-from yaml_file import YamlFileLoader
-
-
-class MetricSpec(YamlFileLoader):
- """metrics in QTIP are categorized by performance test tools, such as
- dhrystone, whetstone and etc"""
- RELATIVE_PATH = 'metric'
diff --git a/qtip/loader/plan.py b/qtip/loader/plan.py
deleted file mode 100644
index e15651a3..00000000
--- a/qtip/loader/plan.py
+++ /dev/null
@@ -1,58 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 ZTE Corp 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
-##############################################################################
-
-
-from qtip.base.constant import BaseProp
-from qtip.collector import CollectorProp as CProp
-from qtip.collector.logfile import LogfileCollector
-from qtip.loader.yaml_file import YamlFileLoader
-from qtip.loader.qpi import QPISpec
-
-
-# TODO(yujunz) more elegant way to load module dynamically
-def load_collector(type_name):
- if type_name == LogfileCollector.TYPE:
- return LogfileCollector
- else:
- raise Exception("Invalid collector type: {}".format(type_name))
-
-
-class Plan(YamlFileLoader):
- """
- a benchmark plan is consist of configuration and a QPI list
- """
-
- RELATIVE_PATH = 'plan'
-
- def __init__(self, name, paths=None):
- super(Plan, self).__init__(name, paths)
-
- _config = self.content[PlanProp.CONFIG]
-
- self.collectors = [load_collector(c[CProp.TYPE])(c, self)
- for c in _config[PlanProp.COLLECTORS]]
-
- self.qpis = [QPISpec(qpi, paths=paths)
- for qpi in self.content[PlanProp.QPIS]]
-
-
-class PlanProp(BaseProp):
- # plan
- INFO = 'info'
-
- FACILITY = 'facility'
- ENGINEER = 'engineer'
-
- CONFIG = 'config'
-
- DRIVER = 'driver'
- COLLECTORS = 'collectors'
- REPORTER = 'reporter'
-
- QPIS = 'QPIs'
diff --git a/qtip/loader/qpi.py b/qtip/loader/qpi.py
index 73da61e9..2a85766e 100644
--- a/qtip/loader/qpi.py
+++ b/qtip/loader/qpi.py
@@ -8,7 +8,6 @@
##############################################################################
from yaml_file import YamlFileLoader
-from metric import MetricSpec
from qtip.base.constant import SpecProp
from qtip.util.formula import Formula
@@ -34,5 +33,3 @@ class Section(object):
self.name = content[SpecProp.NAME]
self.weight = content[SpecProp.WEIGHT]
self.formula = Formula(content[SpecProp.FORMULA])
- self.metrics = [MetricSpec(record, paths=paths)
- for record in content[SpecProp.METRICS]]