1/* 2 * Copyright (C) 2022 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 */ 15 16export class SliceGroup { 17 title: string | null | undefined = ''; 18 count: number = 0; 19 state?: string; 20 tid?: number; 21 pid?: number; 22 status: boolean = false; 23 minDuration: number = 0; 24 maxDuration: number = 0; 25 wallDuration: number = 0; 26 avgDuration: string = ''; 27 children?: Array<SliceGroup>; 28} 29 30export class SPTChild { 31 process: string = ''; 32 processId: number = 0; 33 processName: string = ''; 34 thread: string = ''; 35 threadId: number = 0; 36 threadName: string = ''; 37 state: string = ''; 38 startNs: number = 0; 39 startTime: string = ''; 40 absoluteTime: number = 0; 41 duration: number = 0; 42 cpu: number | undefined = undefined; 43 core: string = ''; 44 priority: number = 0; 45 prior: string = ''; 46 note: string = '-'; 47} 48 49export class Priority extends SliceGroup { 50 iTid: number = 0; 51 priorityType: string = '-'; 52 endState: string = ''; 53 dur: number = 0; 54 priority: number = 0; 55 status: boolean = false; 56} 57