aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--benchmarks/QPI/compute.yaml37
-rw-r--r--qtip/ansible_library/plugins/action/calculate.py2
-rw-r--r--qtip/loader/file.py2
-rw-r--r--qtip/loader/qpi.py5
-rw-r--r--resources/ansible_roles/qtip/tasks/calculate.yml2
-rw-r--r--resources/baselines/compute.json (renamed from resources/QPI/compute-baseline.json)0
-rw-r--r--tests/conftest.py2
7 files changed, 7 insertions, 43 deletions
diff --git a/benchmarks/QPI/compute.yaml b/benchmarks/QPI/compute.yaml
deleted file mode 100644
index 78a2d324..00000000
--- a/benchmarks/QPI/compute.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 ZTE Corporation 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
-##############################################################################
-title: compute
-description: sample performance index of computing
-formula: weighted arithmetic mean
-sections:
-- name: Integer
- weight: 0.3
- formula: geometric mean
- metrics:
- - dhrystone.yaml
-- name: Float
- weight: 0.3
- formula: geometric mean
- metrics:
- - whetstone.yaml
-- name: Memory
- weight: 0.2
- formula: geometric mean
- metrics:
- - ramspeed.yaml
-- name: DPI
- weight: 0.1
- formula: geometric mean
- metrics:
- - dpi.yaml
-- name: SSL
- weight: 0.1
- formula: geometric mean
- metrics:
- - ssl.yaml
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))
diff --git a/resources/ansible_roles/qtip/tasks/calculate.yml b/resources/ansible_roles/qtip/tasks/calculate.yml
index b07d12f8..9444a0e2 100644
--- a/resources/ansible_roles/qtip/tasks/calculate.yml
+++ b/resources/ansible_roles/qtip/tasks/calculate.yml
@@ -21,6 +21,6 @@
floating: "{{ qtip_results }}/arithmetic/metrics.json"
sysinfo: "{{ qtip_results }}/sysinfo/condition.json"
spec: "{{ qtip_resources }}/QPI/compute.yaml"
- baseline: "{{ qtip_resources }}/QPI/compute-baseline.json"
+ baseline: "{{ qtip_resources }}/baselines/compute.json"
dest: "{{ qtip_results }}/compute.json"
delegate_to: localhost
diff --git a/resources/QPI/compute-baseline.json b/resources/baselines/compute.json
index 3aa19970..3aa19970 100644
--- a/resources/QPI/compute-baseline.json
+++ b/resources/baselines/compute.json
diff --git a/tests/conftest.py b/tests/conftest.py
index 8e812d66..343f3548 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -156,7 +156,7 @@ def qpi_result(section_result, info):
'system_info': info,
'sections': [section_result],
'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",
}