summaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-16 16:31:44 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-08-16 16:36:26 +0800
commit86b0ef02f5c0ec0ec80ffb0f507ecf7e573611c6 (patch)
treea688aefbc1b35922ab56f807e6c22f9303fabe75 /qtip
parentd602404a17f1935a524e8fc46ed853d4c7717164 (diff)
Migrate contents from benchmarks to resources
Change-Id: I189c3d5224ec58ad63851d173b94204b273c3696 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip')
-rw-r--r--qtip/ansible_library/plugins/action/calculate.py2
-rw-r--r--qtip/loader/file.py2
-rw-r--r--qtip/loader/qpi.py5
3 files changed, 5 insertions, 4 deletions
diff --git a/qtip/ansible_library/plugins/action/calculate.py b/qtip/ansible_library/plugins/action/calculate.py
index 33cda1bb..fa459406 100644
--- a/qtip/ansible_library/plugins/action/calculate.py
+++ b/qtip/ansible_library/plugins/action/calculate.py
@@ -88,7 +88,7 @@ def calc_qpi(qpi_spec, metrics, sysinfo, qpi_baseline):
'system_info': sysinfo,
'sections': section_results,
'spec': "https://git.opnfv.org/qtip/tree/resources/QPI/compute.yaml",
- 'baseline': "https://git.opnfv.org/qtip/tree/resources/QPI/compute-baseline.json"
+ 'baseline': "https://git.opnfv.org/qtip/tree/resources/baselines/compute.json"
}
return results
diff --git a/qtip/loader/file.py b/qtip/loader/file.py
index a39e15f6..6ef4bf3c 100644
--- a/qtip/loader/file.py
+++ b/qtip/loader/file.py
@@ -17,7 +17,7 @@ from qtip.loader.base import BaseLoader
ROOT_DIR = path.join(path.dirname(__file__), path.pardir, path.pardir,
- 'benchmarks')
+ 'resources')
class FileLoader(BaseLoader):
diff --git a/qtip/loader/qpi.py b/qtip/loader/qpi.py
index 2a85766e..48f52e84 100644
--- a/qtip/loader/qpi.py
+++ b/qtip/loader/qpi.py
@@ -9,6 +9,7 @@
from yaml_file import YamlFileLoader
+from qtip.base.constant import FormulaName
from qtip.base.constant import SpecProp
from qtip.util.formula import Formula
@@ -31,5 +32,5 @@ class QPISpec(YamlFileLoader):
class Section(object):
def __init__(self, content, paths=None):
self.name = content[SpecProp.NAME]
- self.weight = content[SpecProp.WEIGHT]
- self.formula = Formula(content[SpecProp.FORMULA])
+ self.weight = content.get(SpecProp.WEIGHT, None)
+ self.formula = Formula(content.get(SpecProp.FORMULA, FormulaName.ARITHMETIC_MEAN))