1fb726d48Sopenharmony_ci/* 2fb726d48Sopenharmony_ci * Copyright (C) 2023 Huawei Device Co., Ltd. 3fb726d48Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4fb726d48Sopenharmony_ci * you may not use this file except in compliance with the License. 5fb726d48Sopenharmony_ci * You may obtain a copy of the License at 6fb726d48Sopenharmony_ci * 7fb726d48Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8fb726d48Sopenharmony_ci * 9fb726d48Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10fb726d48Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11fb726d48Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12fb726d48Sopenharmony_ci * See the License for the specific language governing permissions and 13fb726d48Sopenharmony_ci * limitations under the License. 14fb726d48Sopenharmony_ci */ 15fb726d48Sopenharmony_ci 16fb726d48Sopenharmony_ciexport class ThreadInitConfig { 17fb726d48Sopenharmony_ci endTs: number = 0; 18fb726d48Sopenharmony_ci pid: number = -1; 19fb726d48Sopenharmony_ci state: string = ''; 20fb726d48Sopenharmony_ci tid: number = -1; 21fb726d48Sopenharmony_ci ts: number = -1; 22fb726d48Sopenharmony_ci dur: number = -1; 23fb726d48Sopenharmony_ci duration: number = -1; 24fb726d48Sopenharmony_ci cycleStartTime: number = -1; 25fb726d48Sopenharmony_ci cycleEndTime: number = -1; 26fb726d48Sopenharmony_ci} 27fb726d48Sopenharmony_ciexport class SchedSwitchCountBean { 28fb726d48Sopenharmony_ci nodeFlag: string | undefined; 29fb726d48Sopenharmony_ci startNS: number; 30fb726d48Sopenharmony_ci cycleStartTime: string = ''; 31fb726d48Sopenharmony_ci dur: number | string; 32fb726d48Sopenharmony_ci duration: number | string; 33fb726d48Sopenharmony_ci cycle: number = -1; 34fb726d48Sopenharmony_ci title: string = ''; 35fb726d48Sopenharmony_ci value: number = 0; 36fb726d48Sopenharmony_ci level: string = ''; 37fb726d48Sopenharmony_ci colorIndex: number = -1; 38fb726d48Sopenharmony_ci children: Array<SchedSwitchCountBean> = []; 39fb726d48Sopenharmony_ci constructor( 40fb726d48Sopenharmony_ci nodeFlag: string | undefined, 41fb726d48Sopenharmony_ci startNS: number, 42fb726d48Sopenharmony_ci cycleStartTime: string, 43fb726d48Sopenharmony_ci dur: number | string, 44fb726d48Sopenharmony_ci duration: number | string, 45fb726d48Sopenharmony_ci cycle: number, 46fb726d48Sopenharmony_ci title: string, 47fb726d48Sopenharmony_ci value: number, 48fb726d48Sopenharmony_ci level: string, 49fb726d48Sopenharmony_ci colorIndex: number, 50fb726d48Sopenharmony_ci children: Array<SchedSwitchCountBean> 51fb726d48Sopenharmony_ci ) { 52fb726d48Sopenharmony_ci this.nodeFlag = nodeFlag; 53fb726d48Sopenharmony_ci this.startNS = startNS; 54fb726d48Sopenharmony_ci this.cycleStartTime = cycleStartTime; 55fb726d48Sopenharmony_ci this.dur = dur; 56fb726d48Sopenharmony_ci this.duration = duration; 57fb726d48Sopenharmony_ci this.cycle = cycle; 58fb726d48Sopenharmony_ci this.title = title; 59fb726d48Sopenharmony_ci this.value = value; 60fb726d48Sopenharmony_ci this.level = level; 61fb726d48Sopenharmony_ci this.colorIndex = colorIndex; 62fb726d48Sopenharmony_ci this.children = children; 63fb726d48Sopenharmony_ci } 64fb726d48Sopenharmony_ci} 65fb726d48Sopenharmony_ciexport class TreeSwitchConfig { 66fb726d48Sopenharmony_ci value: number = 0; 67fb726d48Sopenharmony_ci dur!: number | string | undefined; 68fb726d48Sopenharmony_ci duration!: number | string | undefined; 69fb726d48Sopenharmony_ci isHover?: boolean = false; 70fb726d48Sopenharmony_ci isSelected?: boolean = false; 71fb726d48Sopenharmony_ci cycle?: number = 0; 72fb726d48Sopenharmony_ci level: string = ''; 73fb726d48Sopenharmony_ci pid: number = -1; 74fb726d48Sopenharmony_ci process: string | undefined; 75fb726d48Sopenharmony_ci status?: boolean = false; 76fb726d48Sopenharmony_ci thread: string | undefined; 77fb726d48Sopenharmony_ci tid: number = -1; 78fb726d48Sopenharmony_ci title: string = ''; 79fb726d48Sopenharmony_ci cycleStartTime!: number | string | undefined; 80fb726d48Sopenharmony_ci children: Array<TreeSwitchConfig> = []; 81fb726d48Sopenharmony_ci} 82fb726d48Sopenharmony_ciexport class HistogramSourceConfig { 83fb726d48Sopenharmony_ci average: number = 0; 84fb726d48Sopenharmony_ci color: string = ''; 85fb726d48Sopenharmony_ci value: number = 0; 86fb726d48Sopenharmony_ci cycleNum: number = 0; 87fb726d48Sopenharmony_ci isHover: boolean = false; 88fb726d48Sopenharmony_ci size: string = ''; 89fb726d48Sopenharmony_ci} 90fb726d48Sopenharmony_ciexport class CutDataObjConfig { 91fb726d48Sopenharmony_ci cyclesArr: Array<SchedSwitchCountBean> = []; 92fb726d48Sopenharmony_ci pid: number = -1; 93fb726d48Sopenharmony_ci tid: number = -1; 94fb726d48Sopenharmony_ci process: string | undefined; 95fb726d48Sopenharmony_ci thread: string | undefined; 96fb726d48Sopenharmony_ci processTitle: string = ''; 97fb726d48Sopenharmony_ci threadTitle: string = ''; 98fb726d48Sopenharmony_ci threadCountTotal: number = 0; 99fb726d48Sopenharmony_ci threadDurTotal!: number | string; 100fb726d48Sopenharmony_ci} 101