Skip to content

Commit 6c16e68

Browse files
Support Global statistics (#139)
1 parent 47508bc commit 6c16e68

File tree

2 files changed

+292
-0
lines changed

2 files changed

+292
-0
lines changed

src/main/java/com/cisco/trex/ClientBase.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.cisco.trex.stateless.model.capture.CaptureMonitorStop;
1616
import com.cisco.trex.stateless.model.capture.CapturedPackets;
1717
import com.cisco.trex.stateless.model.stats.ExtendedPortStatistics;
18+
import com.cisco.trex.stateless.model.stats.GlobalStatistics;
1819
import com.cisco.trex.stateless.model.stats.PortStatistics;
1920
import com.cisco.trex.stateless.model.stats.XstatsNames;
2021
import com.cisco.trex.stateless.util.DoubleAsIntDeserializer;
@@ -348,6 +349,11 @@ public PortStatistics getPortStatistics(int portIndex) {
348349
return callMethod("get_port_stats", parameters, PortStatistics.class).get();
349350
}
350351

352+
/** @return GlobalStatistics */
353+
public GlobalStatistics getGlobalStatistics() {
354+
return callMethod("get_global_stats", null, GlobalStatistics.class).get();
355+
}
356+
351357
/**
352358
* @param portIndex
353359
* @return ExtendedPortStatistics
Lines changed: 286 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,286 @@
1+
package com.cisco.trex.stateless.model.stats;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
5+
public class GlobalStatistics {
6+
7+
@JsonProperty("m_active_flows")
8+
private double mActiveFlows = 0.0;
9+
10+
@JsonProperty("m_active_sockets")
11+
private long mActiveSockets = 0;
12+
13+
@JsonProperty("m_bw_per_core")
14+
private double mBwPerCore = 0.0;
15+
16+
@JsonProperty("m_cpu_util")
17+
private double mCpuUtil = 0.0;
18+
19+
@JsonProperty("m_cpu_util_raw")
20+
private double mCpuUtilRaw = 0.0;
21+
22+
@JsonProperty("m_open_flows")
23+
private double mOpenFlows = 0.0;
24+
25+
@JsonProperty("m_platform_factor")
26+
private double mPlatformFactor = 0.0;
27+
28+
@JsonProperty("m_rx_bps")
29+
private double mRxBps = 0.0;
30+
31+
@JsonProperty("m_rx_core_pps")
32+
private double mRxCorePps = 0.0;
33+
34+
@JsonProperty("m_rx_cpu_util")
35+
private double mRxCpuUtil = 0.0;
36+
37+
@JsonProperty("m_rx_drop_bps")
38+
private double mRxDropBps = 0.0;
39+
40+
@JsonProperty("m_rx_pps")
41+
private double mRxPps = 0.0;
42+
43+
@JsonProperty("m_socket_util")
44+
private double mSocketUtil = 0.0;
45+
46+
@JsonProperty("m_total_alloc_error")
47+
private long mTotalAllocError = 0;
48+
49+
@JsonProperty("m_total_clients")
50+
private long mTotalClients = 0;
51+
52+
@JsonProperty("m_total_nat_active ")
53+
private long mTotalNatActive = 0;
54+
55+
@JsonProperty("m_total_nat_learn_error")
56+
private long mTotalNatLearnError = 0;
57+
58+
@JsonProperty("m_total_nat_no_fid ")
59+
private long mTotalNatNoFid = 0;
60+
61+
@JsonProperty("m_total_nat_open ")
62+
private long mTotalNatOpen = 0;
63+
64+
@JsonProperty("m_total_nat_syn_wait")
65+
private long mTotalNatSynWait = 0;
66+
67+
@JsonProperty("m_total_nat_time_out")
68+
private long mTotalNatTimeOut = 0;
69+
70+
@JsonProperty("m_total_nat_time_out_wait_ack")
71+
private long mTotalNatTimeOutWaitAck = 0;
72+
73+
@JsonProperty("m_total_queue_drop")
74+
private long mTotalQueueDrop = 0;
75+
76+
@JsonProperty("m_total_queue_full")
77+
private long mTotalQueueFull = 0;
78+
79+
@JsonProperty("m_total_rx_bytes")
80+
private long mTotalRxBytes = 0;
81+
82+
@JsonProperty("m_total_rx_pkts")
83+
private long mTotalRxPkts = 0;
84+
85+
@JsonProperty("m_total_servers")
86+
private long mTotalServers = 0;
87+
88+
@JsonProperty("m_total_tx_bytes")
89+
private long mTotalTxBytes = 0;
90+
91+
@JsonProperty("m_total_tx_pkts")
92+
private long mTotalTxPkts = 0;
93+
94+
@JsonProperty("m_tx_bps")
95+
private double mTxBps = 0.0;
96+
97+
@JsonProperty("m_tx_cps")
98+
private double mTxCps = 0.0;
99+
100+
@JsonProperty("m_tx_expected_bps")
101+
private double mTxExpectedBps = 0.0;
102+
103+
@JsonProperty("m_tx_expected_cps")
104+
private double mTxExpectedCps = 0.0;
105+
106+
@JsonProperty("m_tx_expected_pps")
107+
private double mTxExpectedPps = 0.0;
108+
109+
@JsonProperty("m_tx_pps")
110+
private double mTxPps = 0.0;
111+
112+
@JsonProperty("m_active_flows")
113+
public double getMActiveFlows() {
114+
return mActiveFlows;
115+
}
116+
117+
@JsonProperty("m_active_sockets")
118+
public long getMActiveSockets() {
119+
return mActiveSockets;
120+
}
121+
122+
@JsonProperty("m_bw_per_core")
123+
public double getMBwPerCore() {
124+
return mBwPerCore;
125+
}
126+
127+
@JsonProperty("m_cpu_util")
128+
public double getMCpuUtil() {
129+
return mCpuUtil;
130+
}
131+
132+
@JsonProperty("m_cpu_util_raw")
133+
public double getMCpuUtilRaw() {
134+
return mCpuUtilRaw;
135+
}
136+
137+
@JsonProperty("m_open_flows")
138+
public double getMOpenFlows() {
139+
return mOpenFlows;
140+
}
141+
142+
@JsonProperty("m_platform_factor")
143+
public double getMPlatformFactor() {
144+
return mPlatformFactor;
145+
}
146+
147+
@JsonProperty("m_rx_bps")
148+
public double getMRxBps() {
149+
return mRxBps;
150+
}
151+
152+
@JsonProperty("m_rx_core_pps")
153+
public double getMRxCorePps() {
154+
return mRxCorePps;
155+
}
156+
157+
@JsonProperty("m_rx_cpu_util")
158+
public double getMRxCpuUtil() {
159+
return mRxCpuUtil;
160+
}
161+
162+
@JsonProperty("m_rx_drop_bps")
163+
public double getMRxDropBps() {
164+
return mRxDropBps;
165+
}
166+
167+
@JsonProperty("m_rx_pps")
168+
public Double getMRxPps() {
169+
return mRxPps;
170+
}
171+
172+
@JsonProperty("m_socket_util")
173+
public double getMSocketUtil() {
174+
return mSocketUtil;
175+
}
176+
177+
@JsonProperty("m_total_alloc_error")
178+
public long getMTotalAllocError() {
179+
return mTotalAllocError;
180+
}
181+
182+
@JsonProperty("m_total_clients")
183+
public long getMTotalClients() {
184+
return mTotalClients;
185+
}
186+
187+
@JsonProperty("m_total_nat_active ")
188+
public long getMTotalNatActive() {
189+
return mTotalNatActive;
190+
}
191+
192+
@JsonProperty("m_total_nat_learn_error")
193+
public long getMTotalNatLearnError() {
194+
return mTotalNatLearnError;
195+
}
196+
197+
@JsonProperty("m_total_nat_no_fid ")
198+
public long getMTotalNatNoFid() {
199+
return mTotalNatNoFid;
200+
}
201+
202+
@JsonProperty("m_total_nat_open ")
203+
public long getMTotalNatOpen() {
204+
return mTotalNatOpen;
205+
}
206+
207+
@JsonProperty("m_total_nat_syn_wait")
208+
public long getMTotalNatSynWait() {
209+
return mTotalNatSynWait;
210+
}
211+
212+
@JsonProperty("m_total_nat_time_out")
213+
public long getMTotalNatTimeOut() {
214+
return mTotalNatTimeOut;
215+
}
216+
217+
@JsonProperty("m_total_nat_time_out_wait_ack")
218+
public long getMTotalNatTimeOutWaitAck() {
219+
return mTotalNatTimeOutWaitAck;
220+
}
221+
222+
@JsonProperty("m_total_queue_drop")
223+
public long getMTotalQueueDrop() {
224+
return mTotalQueueDrop;
225+
}
226+
227+
@JsonProperty("m_total_queue_full")
228+
public long getMTotalQueueFull() {
229+
return mTotalQueueFull;
230+
}
231+
232+
@JsonProperty("m_total_rx_bytes")
233+
public long getMTotalRxBytes() {
234+
return mTotalRxBytes;
235+
}
236+
237+
@JsonProperty("m_total_rx_pkts")
238+
public long getMTotalRxPkts() {
239+
return mTotalRxPkts;
240+
}
241+
242+
@JsonProperty("m_total_servers")
243+
public long getMTotalServers() {
244+
return mTotalServers;
245+
}
246+
247+
@JsonProperty("m_total_tx_bytes")
248+
public long getMTotalTxBytes() {
249+
return mTotalTxBytes;
250+
}
251+
252+
@JsonProperty("m_total_tx_pkts")
253+
public long getMTotalTxPkts() {
254+
return mTotalTxPkts;
255+
}
256+
257+
@JsonProperty("m_tx_bps")
258+
public double getMTxBps() {
259+
return mTxBps;
260+
}
261+
262+
@JsonProperty("m_tx_cps")
263+
public double getMTxCps() {
264+
return mTxCps;
265+
}
266+
267+
@JsonProperty("m_tx_expected_bps")
268+
public double getMTxExpectedBps() {
269+
return mTxExpectedBps;
270+
}
271+
272+
@JsonProperty("m_tx_expected_cps")
273+
public double getMTxExpectedCps() {
274+
return mTxExpectedCps;
275+
}
276+
277+
@JsonProperty("m_tx_expected_pps")
278+
public double getMTxExpectedPps() {
279+
return mTxExpectedPps;
280+
}
281+
282+
@JsonProperty("m_tx_pps")
283+
public double getMTxPps() {
284+
return mTxPps;
285+
}
286+
}

0 commit comments

Comments
 (0)