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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events;
23 import com.google.gson.annotations.SerializedName;
26 * This class is a POJO representing an output event for load testing.
28 public class OutputEvent extends InputEvent {
29 @SerializedName(value = "TestMatchCaseSelected")
30 private int testMatchCaseSelected;
32 @SerializedName(value = "TestMatchStateTime")
33 private long testMatchStateTime;
35 @SerializedName(value = "TestEstablishCaseSelected")
36 private int testEstablishCaseSelected;
38 @SerializedName(value = "TestEstablishStateTime")
39 private long testEstablishStateTime;
41 @SerializedName(value = "TestDecideCaseSelected")
42 private int testDecideCaseSelected;
44 @SerializedName(value = "TestDecideStateTime")
45 private long testDecideStateTime;
47 @SerializedName(value = "TestActCaseSelected")
48 private int testActCaseSelected;
50 @SerializedName(value = "TestActStateTime")
51 private long testActStateTime;
53 private long testReceviedTimestamp = System.nanoTime();
55 public int getTestMatchCaseSelected() {
56 return testMatchCaseSelected;
59 public void setTestMatchCaseSelected(int testMatchCaseSelected) {
60 this.testMatchCaseSelected = testMatchCaseSelected;
63 public long getTestMatchStateTime() {
64 return testMatchStateTime;
67 public void setTestMatchStateTime(long testMatchStateTime) {
68 this.testMatchStateTime = testMatchStateTime;
71 public int getTestEstablishCaseSelected() {
72 return testEstablishCaseSelected;
75 public void setTestEstablishCaseSelected(int testEstablishCaseSelected) {
76 this.testEstablishCaseSelected = testEstablishCaseSelected;
79 public long getTestEstablishStateTime() {
80 return testEstablishStateTime;
83 public void setTestEstablishStateTime(long testEstablishStateTime) {
84 this.testEstablishStateTime = testEstablishStateTime;
87 public int getTestDecideCaseSelected() {
88 return testDecideCaseSelected;
91 public void setTestDecideCaseSelected(int testDecideCaseSelected) {
92 this.testDecideCaseSelected = testDecideCaseSelected;
95 public long getTestDecideStateTime() {
96 return testDecideStateTime;
99 public void setTestDecideStateTime(long testDecideStateTime) {
100 this.testDecideStateTime = testDecideStateTime;
103 public int getTestActCaseSelected() {
104 return testActCaseSelected;
107 public void setTestActCaseSelected(int testActCaseSelected) {
108 this.testActCaseSelected = testActCaseSelected;
111 public long getTestActStateTime() {
112 return testActStateTime;
115 public void setTestActStateTime(long testActStateTime) {
116 this.testActStateTime = testActStateTime;
119 public long getTestReceviedTimestamp() {
120 return testReceviedTimestamp;
123 public void setTestReceviedTimestamp(long testReceviedTimestamp) {
124 this.testReceviedTimestamp = testReceviedTimestamp;
127 public int findBatchNumber() {
128 return Integer.valueOf(getTestSlogan().substring(0, getTestSlogan().indexOf('-')));
131 public int findEventNumber() {
132 return Integer.valueOf(
133 getTestSlogan().substring(getTestSlogan().indexOf('-') + 1, getTestSlogan().indexOf(':')));