0350b3f2ecc34a82423c2981273c14e7e66caea8
[policy/apex-pdp.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events;
22
23 import com.google.gson.annotations.SerializedName;
24
25 /**
26  * This class is a POJO representing an output event for load testing.
27  */
28 public class OutputEvent extends InputEvent {
29     @SerializedName(value = "TestMatchCaseSelected")
30     private int testMatchCaseSelected;
31
32     @SerializedName(value = "TestMatchStateTime")
33     private long testMatchStateTime;
34
35     @SerializedName(value = "TestEstablishCaseSelected")
36     private int testEstablishCaseSelected;
37
38     @SerializedName(value = "TestEstablishStateTime")
39     private long testEstablishStateTime;
40
41     @SerializedName(value = "TestDecideCaseSelected")
42     private int testDecideCaseSelected;
43
44     @SerializedName(value = "TestDecideStateTime")
45     private long testDecideStateTime;
46
47     @SerializedName(value = "TestActCaseSelected")
48     private int testActCaseSelected;
49
50     @SerializedName(value = "TestActStateTime")
51     private long testActStateTime;
52
53     private long testReceviedTimestamp = System.nanoTime();
54
55     public int getTestMatchCaseSelected() {
56         return testMatchCaseSelected;
57     }
58
59     public void setTestMatchCaseSelected(int testMatchCaseSelected) {
60         this.testMatchCaseSelected = testMatchCaseSelected;
61     }
62
63     public long getTestMatchStateTime() {
64         return testMatchStateTime;
65     }
66
67     public void setTestMatchStateTime(long testMatchStateTime) {
68         this.testMatchStateTime = testMatchStateTime;
69     }
70
71     public int getTestEstablishCaseSelected() {
72         return testEstablishCaseSelected;
73     }
74
75     public void setTestEstablishCaseSelected(int testEstablishCaseSelected) {
76         this.testEstablishCaseSelected = testEstablishCaseSelected;
77     }
78
79     public long getTestEstablishStateTime() {
80         return testEstablishStateTime;
81     }
82
83     public void setTestEstablishStateTime(long testEstablishStateTime) {
84         this.testEstablishStateTime = testEstablishStateTime;
85     }
86
87     public int getTestDecideCaseSelected() {
88         return testDecideCaseSelected;
89     }
90
91     public void setTestDecideCaseSelected(int testDecideCaseSelected) {
92         this.testDecideCaseSelected = testDecideCaseSelected;
93     }
94
95     public long getTestDecideStateTime() {
96         return testDecideStateTime;
97     }
98
99     public void setTestDecideStateTime(long testDecideStateTime) {
100         this.testDecideStateTime = testDecideStateTime;
101     }
102
103     public int getTestActCaseSelected() {
104         return testActCaseSelected;
105     }
106
107     public void setTestActCaseSelected(int testActCaseSelected) {
108         this.testActCaseSelected = testActCaseSelected;
109     }
110
111     public long getTestActStateTime() {
112         return testActStateTime;
113     }
114
115     public void setTestActStateTime(long testActStateTime) {
116         this.testActStateTime = testActStateTime;
117     }
118
119     public long getTestReceviedTimestamp() {
120         return testReceviedTimestamp;
121     }
122
123     public void setTestReceviedTimestamp(long testReceviedTimestamp) {
124         this.testReceviedTimestamp = testReceviedTimestamp;
125     }
126
127     public int findBatchNumber() {
128         return Integer.valueOf(getTestSlogan().substring(0, getTestSlogan().indexOf('-')));
129     }
130
131     public int findEventNumber() {
132         return Integer.valueOf(
133                         getTestSlogan().substring(getTestSlogan().indexOf('-') + 1, getTestSlogan().indexOf(':')));
134     }
135 }