1 /* 2 * Copyright (c) 2021 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 16 package ohos.devtools.views.trace.metrics.bean; 17 18 import ohos.devtools.views.trace.DField; 19 20 import java.util.Objects; 21 22 /** 23 * Sys Calls Top 24 * 25 * @since 2021/5/19 16:39 26 */ 27 public class SysCallsTop { 28 @DField(name = "tid") 29 private int tid; 30 @DField(name = "pid") 31 private int pid; 32 @DField(name = "minDur") 33 private int minDur; 34 @DField(name = "avgDur") 35 private int avgDur; 36 @DField(name = "maxDur") 37 private int maxDur; 38 @DField(name = "funName") 39 private String funName; 40 @DField(name = "process_name") 41 private String processName; 42 @DField(name = "thread_name") 43 private String threadName; 44 getTid()45 public int getTid() { 46 return tid; 47 } 48 setTid(int tid)49 public void setTid(int tid) { 50 this.tid = tid; 51 } 52 getPid()53 public int getPid() { 54 return pid; 55 } 56 setPid(int pid)57 public void setPid(int pid) { 58 this.pid = pid; 59 } 60 getMinDur()61 public int getMinDur() { 62 return minDur; 63 } 64 setMinDur(int minDur)65 public void setMinDur(int minDur) { 66 this.minDur = minDur; 67 } 68 getAvgDur()69 public int getAvgDur() { 70 return avgDur; 71 } 72 setAvgDur(int avgDur)73 public void setAvgDur(int avgDur) { 74 this.avgDur = avgDur; 75 } 76 getMaxDur()77 public int getMaxDur() { 78 return maxDur; 79 } 80 setMaxDur(int maxDur)81 public void setMaxDur(int maxDur) { 82 this.maxDur = maxDur; 83 } 84 getFunName()85 public String getFunName() { 86 return funName; 87 } 88 setFunName(String funName)89 public void setFunName(String funName) { 90 this.funName = funName; 91 } 92 getProcessName()93 public String getProcessName() { 94 return processName; 95 } 96 setProcessName(String processName)97 public void setProcessName(String processName) { 98 this.processName = processName; 99 } 100 getThreadName()101 public String getThreadName() { 102 return threadName; 103 } 104 setThreadName(String threadName)105 public void setThreadName(String threadName) { 106 this.threadName = threadName; 107 } 108 109 @Override equals(Object obj)110 public boolean equals(Object obj) { 111 if (this == obj) { 112 return true; 113 } 114 if (obj == null || getClass() != obj.getClass()) { 115 return false; 116 } 117 SysCallsTop that = (SysCallsTop) obj; 118 return tid == that.tid && pid == that.pid && minDur == that.minDur && avgDur == that.avgDur 119 && maxDur == that.maxDur && Objects.equals(funName, that.funName) && Objects 120 .equals(processName, that.processName) && Objects.equals(threadName, that.threadName); 121 } 122 123 @Override hashCode()124 public int hashCode() { 125 return Objects.hash(tid, pid, minDur, avgDur, maxDur, funName, processName, threadName); 126 } 127 128 @Override toString()129 public String toString() { 130 return "SysCallsTop{" + "tid=" + tid + ", pid=" + pid + ", minDur=" + minDur + ", avgDur=" + avgDur 131 + ", maxDur=" + maxDur + ", funName='" + funName + '\'' + ", processName='" + processName + '\'' 132 + ", threadName='" + threadName + '\'' + '}'; 133 } 134 } 135