Skip to content

Commit 6684f1e

Browse files
authored
add aliases for global stats to adapt the counter name change in trex-core (#141)
* add aliases for global stats to adapt the counter name change in trex-core Signed-off-by: Leo Ma <[email protected]>
1 parent e723525 commit 6684f1e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/main/java/com/cisco/trex/stateless/model/stats/GlobalStatistics.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.cisco.trex.stateless.model.stats;
22

3+
import com.fasterxml.jackson.annotation.JsonAlias;
34
import com.fasterxml.jackson.annotation.JsonProperty;
45

56
public class GlobalStatistics {
@@ -49,16 +50,19 @@ public class GlobalStatistics {
4950
@JsonProperty("m_total_clients")
5051
private long mTotalClients = 0;
5152

52-
@JsonProperty("m_total_nat_active ")
53+
@JsonProperty("m_total_nat_active")
54+
@JsonAlias("m_total_nat_active ")
5355
private long mTotalNatActive = 0;
5456

5557
@JsonProperty("m_total_nat_learn_error")
5658
private long mTotalNatLearnError = 0;
5759

58-
@JsonProperty("m_total_nat_no_fid ")
60+
@JsonProperty("m_total_nat_no_fid")
61+
@JsonAlias("m_total_nat_no_fid ")
5962
private long mTotalNatNoFid = 0;
6063

61-
@JsonProperty("m_total_nat_open ")
64+
@JsonProperty("m_total_nat_open")
65+
@JsonAlias("m_total_nat_open ")
6266
private long mTotalNatOpen = 0;
6367

6468
@JsonProperty("m_total_nat_syn_wait")
@@ -184,7 +188,7 @@ public long getMTotalClients() {
184188
return mTotalClients;
185189
}
186190

187-
@JsonProperty("m_total_nat_active ")
191+
@JsonProperty("m_total_nat_active")
188192
public long getMTotalNatActive() {
189193
return mTotalNatActive;
190194
}
@@ -194,12 +198,12 @@ public long getMTotalNatLearnError() {
194198
return mTotalNatLearnError;
195199
}
196200

197-
@JsonProperty("m_total_nat_no_fid ")
201+
@JsonProperty("m_total_nat_no_fid")
198202
public long getMTotalNatNoFid() {
199203
return mTotalNatNoFid;
200204
}
201205

202-
@JsonProperty("m_total_nat_open ")
206+
@JsonProperty("m_total_nat_open")
203207
public long getMTotalNatOpen() {
204208
return mTotalNatOpen;
205209
}

0 commit comments

Comments
 (0)