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 24 * 25 * @since 2021/5/19 16:39 26 */ 27 public class SysCalls { 28 @DField(name = "minDur") 29 private int minDur; 30 @DField(name = "avgDur") 31 private int avgDur; 32 @DField(name = "maxDur") 33 private int maxDur; 34 @DField(name = "funName") 35 private String funName; 36 getMinDur()37 public int getMinDur() { 38 return minDur; 39 } 40 setMinDur(int minDur)41 public void setMinDur(int minDur) { 42 this.minDur = minDur; 43 } 44 getAvgDur()45 public int getAvgDur() { 46 return avgDur; 47 } 48 setAvgDur(int avgDur)49 public void setAvgDur(int avgDur) { 50 this.avgDur = avgDur; 51 } 52 getMaxDur()53 public int getMaxDur() { 54 return maxDur; 55 } 56 setMaxDur(int maxDur)57 public void setMaxDur(int maxDur) { 58 this.maxDur = maxDur; 59 } 60 getFunName()61 public String getFunName() { 62 return funName; 63 } 64 setFunName(String funName)65 public void setFunName(String funName) { 66 this.funName = funName; 67 } 68 69 @Override equals(Object obj)70 public boolean equals(Object obj) { 71 if (this == obj) { 72 return true; 73 } 74 if (obj == null || getClass() != obj.getClass()) { 75 return false; 76 } 77 SysCalls sysCalls = (SysCalls) obj; 78 return minDur == sysCalls.minDur && avgDur == sysCalls.avgDur && maxDur == sysCalls.maxDur && Objects 79 .equals(funName, sysCalls.funName); 80 } 81 82 @Override hashCode()83 public int hashCode() { 84 return Objects.hash(minDur, avgDur, maxDur, funName); 85 } 86 87 @Override toString()88 public String toString() { 89 return "SysCalls{" + "minDur=" + minDur + ", avgDur=" + avgDur + ", maxDur=" + maxDur + ", funName='" + funName 90 + '\'' + '}'; 91 } 92 } 93