From 23f48e46a46976ae6f6d97aea11440e6a8b63121 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Sat, 31 Dec 2016 21:27:38 +0800 Subject: sample QPI for doctor performance measured in verification job The doctor benchmark plan produces a performance profile consist of timestamp at each checkpoint and time cost of each phase.[1] It collects data from log files and render a timeline diagram in console Current progress - skeleton created - method to be implemented [1]: http://artifacts.opnfv.org/doctor/docs/design/index.html#document-performance-profiler JIRA: QTIP-199 Change-Id: I60fbbd37d04a5724841bd85cb3bfed9eabd3741a Signed-off-by: Yujun Zhang --- qtip/reporter/console.py | 14 -------------- qtip/reporter/console/__init__.py | 15 +++++++++++++++ qtip/reporter/console/timeline.j2 | 8 ++++++++ 3 files changed, 23 insertions(+), 14 deletions(-) delete mode 100644 qtip/reporter/console.py create mode 100644 qtip/reporter/console/__init__.py create mode 100644 qtip/reporter/console/timeline.j2 (limited to 'qtip/reporter') diff --git a/qtip/reporter/console.py b/qtip/reporter/console.py deleted file mode 100644 index 136ce358..00000000 --- a/qtip/reporter/console.py +++ /dev/null @@ -1,14 +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 base import BaseReporter - - -class ConsoleReporter(BaseReporter): - """report result to console""" diff --git a/qtip/reporter/console/__init__.py b/qtip/reporter/console/__init__.py new file mode 100644 index 00000000..02d63288 --- /dev/null +++ b/qtip/reporter/console/__init__.py @@ -0,0 +1,15 @@ +############################################################################## +# 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.reporter.base import BaseReporter + + +class ConsoleReporter(BaseReporter): + """report result to console""" diff --git a/qtip/reporter/console/timeline.j2 b/qtip/reporter/console/timeline.j2 new file mode 100644 index 00000000..9c18a996 --- /dev/null +++ b/qtip/reporter/console/timeline.j2 @@ -0,0 +1,8 @@ +{% title %} +{% for phase in phases %} +{{ phase.name|upper }}{{ "TIME" }} +{% for cp in phase.checkpoints %} +{{ cp.name }}{{ cp.timestamp}} +{% endfor %} +{% endfor %} +Total: {{ total }} -- cgit 1.2.3-korg