diff options
author | 2017-02-24 08:59:11 +0100 | |
---|---|---|
committer | 2017-02-24 09:46:21 +0100 | |
commit | 99137ab005df346e3398231f86d1b4bb19d461df (patch) | |
tree | a9cf8ec65fa060b80d7c7360fe00675e6e6bcffb /reporting/utils | |
parent | 6018fc0b65f54b81baa3b0d47e272e61afcb66c1 (diff) |
Add storperf reportign status page
Create associated static storperf page
Prepare vsperf, qtip, bottlenecks
Put Yardstick scenario class into utils directory
Change-Id: I874d1733fe3f37dc5dd557559478e7e0b25371d7
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'reporting/utils')
-rw-r--r-- | reporting/utils/reporting_utils.py | 10 | ||||
-rw-r--r-- | reporting/utils/scenarioResult.py | 29 |
2 files changed, 38 insertions, 1 deletions
diff --git a/reporting/utils/reporting_utils.py b/reporting/utils/reporting_utils.py index 1879fb6..47d67f3 100644 --- a/reporting/utils/reporting_utils.py +++ b/reporting/utils/reporting_utils.py @@ -101,7 +101,15 @@ def getApiResults(case, installer, scenario, version): def getScenarios(case, installer, version): - case = case.getName() + try: + case = case.getName() + except: + # if case is not an object test case, try the string + if type(case) == str: + case = case + else: + raise ValueError("Case cannot be evaluated") + period = get_config('general.period') url_base = get_config('testapi.url') diff --git a/reporting/utils/scenarioResult.py b/reporting/utils/scenarioResult.py new file mode 100644 index 0000000..1f7eb2b --- /dev/null +++ b/reporting/utils/scenarioResult.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# +# 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 +# + + +class ScenarioResult(object): + def __init__(self, status, four_days_score='', ten_days_score='', + score_percent=0.0): + self.status = status + self.four_days_score = four_days_score + self.ten_days_score = ten_days_score + self.score_percent = score_percent + + def getStatus(self): + return self.status + + def getTenDaysScore(self): + return self.ten_days_score + + def getFourDaysScore(self): + return self.four_days_score + + def getScorePercent(self): + return self.score_percent |