1# -*- coding: utf-8 -*- 2# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6"""This contains some mock instances for testing.""" 7 8from __future__ import print_function 9 10from benchmark import Benchmark 11from label import MockLabel 12 13perf_args = 'record -a -e cycles' 14label1 = MockLabel( 15 'test1', 16 'build1', 17 'image1', 18 'autotest_dir', 19 'debug_dir', 20 '/tmp/test_benchmark_run', 21 'x86-alex', 22 'chromeos-alex1', 23 image_args='', 24 cache_dir='', 25 cache_only=False, 26 log_level='average', 27 compiler='gcc', 28 skylab=False, 29 chrome_src=None) 30 31label2 = MockLabel( 32 'test2', 33 'build2', 34 'image2', 35 'autotest_dir', 36 'debug_dir', 37 '/tmp/test_benchmark_run_2', 38 'x86-alex', 39 'chromeos-alex2', 40 image_args='', 41 cache_dir='', 42 cache_only=False, 43 log_level='average', 44 compiler='gcc', 45 skylab=False, 46 chrome_src=None) 47 48benchmark1 = Benchmark('benchmark1', 'autotest_name_1', 'autotest_args', 2, '', 49 perf_args, 'telemetry_Crosperf', '') 50 51benchmark2 = Benchmark('benchmark2', 'autotest_name_2', 'autotest_args', 2, '', 52 perf_args, 'telemetry_Crosperf', '') 53 54keyval = {} 55keyval[0] = { 56 '': 'PASS', 57 'milliseconds_1': '1', 58 'milliseconds_2': '8', 59 'milliseconds_3': '9.2', 60 'test{1}': '2', 61 'test{2}': '4', 62 'ms_1': '2.1', 63 'total': '5', 64 'bool': 'True' 65} 66 67keyval[1] = { 68 '': 'PASS', 69 'milliseconds_1': '3', 70 'milliseconds_2': '5', 71 'ms_1': '2.2', 72 'total': '6', 73 'test{1}': '3', 74 'test{2}': '4', 75 'bool': 'FALSE' 76} 77 78keyval[2] = { 79 '': 'PASS', 80 'milliseconds_4': '30', 81 'milliseconds_5': '50', 82 'ms_1': '2.23', 83 'total': '6', 84 'test{1}': '5', 85 'test{2}': '4', 86 'bool': 'FALSE' 87} 88 89keyval[3] = { 90 '': 'PASS', 91 'milliseconds_1': '3', 92 'milliseconds_6': '7', 93 'ms_1': '2.3', 94 'total': '7', 95 'test{1}': '2', 96 'test{2}': '6', 97 'bool': 'FALSE' 98} 99 100keyval[4] = { 101 '': 'PASS', 102 'milliseconds_1': '3', 103 'milliseconds_8': '6', 104 'ms_1': '2.3', 105 'total': '7', 106 'test{1}': '2', 107 'test{2}': '6', 108 'bool': 'TRUE' 109} 110 111keyval[5] = { 112 '': 'PASS', 113 'milliseconds_1': '3', 114 'milliseconds_8': '6', 115 'ms_1': '2.2', 116 'total': '7', 117 'test{1}': '2', 118 'test{2}': '2', 119 'bool': 'TRUE' 120} 121 122keyval[6] = { 123 '': 'PASS', 124 'milliseconds_1': '3', 125 'milliseconds_8': '6', 126 'ms_1': '2', 127 'total': '7', 128 'test{1}': '2', 129 'test{2}': '4', 130 'bool': 'TRUE' 131} 132 133keyval[7] = { 134 '': 'PASS', 135 'milliseconds_1': '3', 136 'milliseconds_8': '6', 137 'ms_1': '1', 138 'total': '7', 139 'test{1}': '1', 140 'test{2}': '6', 141 'bool': 'TRUE' 142} 143 144keyval[8] = { 145 '': 'PASS', 146 'milliseconds_1': '3', 147 'milliseconds_8': '6', 148 'ms_1': '3.3', 149 'total': '7', 150 'test{1}': '2', 151 'test{2}': '8', 152 'bool': 'TRUE' 153} 154