aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/reporter/console.py
blob: 9aaa5f78a114d9d46b1159249ea4fa13842d49c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
##############################################################################
# Copyright (c) 2017 taseer94@gmail.com 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
##############################################################################

import json
import os
from os import path

from qtip.base import BaseActor


ROOT_DIR = path.join(path.dirname(__file__), path.pardir, path.pardir)


class ConsoleReporter(BaseActor):
    """ report benchmark result to console """

    @staticmethod
    def load_result():
        result_path = path.join(os.getcwd(), 'results', 'current', 'qpi.json')
        with open(result_path) as qpi:
            result = json.load(qpi)
        return result