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 */
15export interface BinderGroup {
16  title: string | null | undefined;
17  totalCount: number;
18  binderAsyncRcvCount?: number;
19  binderReplyCount?: number;
20  binderTransactionAsyncCount?: number;
21  binderTransactionCount?: number;
22  tid: number;
23  pid: number;
24  children?: Array<BinderGroup>;
25  status?: boolean;
26}
27
28export class CycleBinderItem {
29  title: string = '';
30  tid: number = 0;
31  pid: number = 0;
32  durNs: number = 0;
33  tsNs: number = 0;
34  cycleDur: number = 0;
35  cycleStartTime: number = 0;
36  totalCount: number = 0;
37  binderTransactionCount: number = 0;
38  binderAsyncRcvCount: number = 0;
39  binderReplyCount: number = 0;
40  binderTransactionAsyncCount: number = 0;
41  idx: number = -1;
42  type: string = 'Cycle';
43}
44
45export interface ThreadBinderItem {
46  title: string;
47  tid: number;
48  pid: number;
49  totalCount: number;
50  type: string;
51  children: Array<CycleBinderItem>;
52}
53
54export interface ProcessBinderItem {
55  title: string;
56  pid: number;
57  totalCount: number;
58  type: string;
59  children: Array<ThreadBinderItem>;
60}
61
62export interface DataSource {
63  xName: string;
64  yAverage: number;
65}
66
67export interface FunctionItem {
68  cycleStartTime: number;
69  cycleDur: number;
70  dur: number;
71  id: number;
72  tid: number;
73  pid: number;
74}
75
76export class FuncNameCycle {
77  funcName: string = '';
78  cycleStartTime: number = 0;
79  cycleDur: number = 0;
80  startTime: number = 0;
81  endTime: number = 0;
82  id: number = 0;
83  tid: number = 0;
84  pid: number = 0;
85}
86
87export interface BinderDataStruct {
88  name: string;
89  value: number;
90  dur: number;
91  startNS: number;
92  cycle: number;
93  depth?: number;
94}
95
96export interface BinderItem {
97  name: string;
98  ts: number;
99  dur: number;
100  tid: number;
101  pid: number;
102}
103