• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.bean;
17 
18 import ohos.devtools.views.trace.DField;
19 
20 /**
21  * cup usage rate entity class
22  *
23  * @since 2021/04/22 12:25
24  */
25 public class CpuRateBean {
26     @DField(name = "cpu")
27     private int cpu;
28 
29     @DField(name = "ro")
30     private int index;
31 
32     @DField(name = "rate")
33     private double rate;
34 
35     /**
36      * Gets the value of cpu .
37      *
38      * @return the value of int
39      */
getCpu()40     public int getCpu() {
41         return cpu;
42     }
43 
44     /**
45      * Sets the cpu .You can use getCpu() to get the value of cpu
46      *
47      * @param cpu cpu
48      */
setCpu(final int cpu)49     public void setCpu(final int cpu) {
50         this.cpu = cpu;
51     }
52 
53     /**
54      * Gets the value of index .
55      *
56      * @return the value of int
57      */
getIndex()58     public int getIndex() {
59         return index;
60     }
61 
62     /**
63      * Sets the index .You can use getIndex() to get the value of index
64      *
65      * @param index index
66      */
setIndex(final int index)67     public void setIndex(final int index) {
68         this.index = index;
69     }
70 
71     /**
72      * Gets the value of rate .
73      *
74      * @return the value of double
75      */
getRate()76     public double getRate() {
77         return rate;
78     }
79 
80     /**
81      * Sets the rate .You can use getRate() to get the value of rate
82      *
83      * @param rate rate
84      */
setRate(final double rate)85     public void setRate(final double rate) {
86         this.rate = rate;
87     }
88 }
89