1/* 2 * Copyright (C) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15export class GpuCountBean { 16 freq: number = 0; 17 val: number = 0; 18 value: number = 0; 19 startNS: number = 0; 20 dur: number = 0; 21 endTime: number = 0; 22 thread: string = ''; 23 parentIndex: number = 0; 24 level?: number = 0; 25 constructor( 26 freq: number, 27 value: number, 28 val: number, 29 dur: number, 30 startNS: number, 31 endTime: number, 32 thread: string, 33 parentIndex: number 34 ) { 35 this.freq = freq; 36 this.value = value; 37 this.val = val; 38 this.dur = dur; 39 this.startNS = startNS; 40 this.endTime = endTime; 41 this.thread = thread; 42 this.parentIndex = parentIndex; 43 } 44} 45export class SearchGpuFuncBean { 46 funName: string | undefined; 47 startTime: number = 0; 48 dur: number | undefined; 49 endTime: number = 0; 50 threadName: string | undefined; 51 pid: number | undefined; 52} 53export class TreeDataBean { 54 thread?: string = ''; 55 val?: number = 0; 56 freq?: number = 0; 57 gpufreq?: number = 0; 58 dur: number = 0; 59 value: number = 0; 60 percent?: number = 0; 61 children: TreeDataBean[] = []; 62 ts?: number = 0; 63 startTime?: number = 0; 64 startNS?: number = 0; 65 level?: number; 66 cycle?: number; 67} 68 69export class CycleDataBean { 70 colorIndex: number = 0; 71 dur: number = 0; 72 value: number = 0; 73 startNS: number = 0; 74 cycle: number = 0; 75 name: string = ''; 76 depth: number = 1; 77 constructor( 78 colorIndex: number, 79 dur: number, 80 value: number, 81 startNS: number, 82 cycle: number, 83 name: string, 84 depth: number 85 ) { 86 this.colorIndex = colorIndex; 87 this.dur = dur; 88 this.value = value; 89 this.startNS = startNS; 90 this.cycle = cycle; 91 this.name = name; 92 this.depth = this.depth; 93 } 94} 95 96export class TreeDataStringBean { 97 thread: string = ''; 98 value: string = ''; 99 dur: string = ''; 100 percent: string = ''; 101 level?: string = ''; 102 cycle?: number = 0; 103 startNS?: string = ''; 104 freq?: string = ''; 105 children?: TreeDataStringBean[] = []; 106 status?: boolean = false; 107 constructor( 108 thread: string, 109 value: string, 110 dur: string, 111 percent: string, 112 level?: string, 113 freq?: string, 114 cycle?: number, 115 children?: TreeDataStringBean[], 116 startNS?: string, 117 status?: boolean 118 ) { 119 this.thread = thread; 120 this.value = value; 121 this.dur = dur; 122 this.percent = percent; 123 this.level = level; 124 this.freq = freq; 125 this.cycle = cycle; 126 this.children = children; 127 this.startNS = startNS; 128 this.status = status; 129 } 130} 131