@@ -138,7 +138,6 @@ public static void main(String[] args) {
138138 channel .exchangeDeclare (exchangeName , exchangeType );
139139 final Producer p = new Producer (channel , exchangeName , id ,
140140 flags , producerTxSize ,
141- 1000L * samplingInterval ,
142141 rateLimit , minMsgSize , timeLimit ,
143142 confirm , stats );
144143 channel .addReturnListener (p );
@@ -235,7 +234,6 @@ public static class Producer implements Runnable, ReturnListener,
235234 private boolean immediate ;
236235 private boolean persistent ;
237236 private int txSize ;
238- private long interval ;
239237 private int rateLimit ;
240238 private long timeLimit ;
241239
@@ -247,14 +245,13 @@ public static class Producer implements Runnable, ReturnListener,
247245 private long lastStatsTime ;
248246 private int msgCount ;
249247
250- private long confirm ;
251248 private Semaphore confirmPool ;
252249 private volatile SortedSet <Long > unconfirmedSet =
253250 Collections .synchronizedSortedSet (new TreeSet <Long >());
254251
255252 public Producer (Channel channel , String exchangeName , String id ,
256253 List <?> flags , int txSize ,
257- long interval , int rateLimit , int minMsgSize , int timeLimit ,
254+ int rateLimit , int minMsgSize , int timeLimit ,
258255 long confirm , Stats stats )
259256 throws IOException {
260257
@@ -265,11 +262,9 @@ public Producer(Channel channel, String exchangeName, String id,
265262 this .immediate = flags .contains ("immediate" );
266263 this .persistent = flags .contains ("persistent" );
267264 this .txSize = txSize ;
268- this .interval = interval ;
269265 this .rateLimit = rateLimit ;
270266 this .timeLimit = 1000L * timeLimit ;
271267 this .message = new byte [minMsgSize ];
272- this .confirm = confirm ;
273268 if (confirm > 0 ) {
274269 this .confirmPool = new Semaphore ((int )confirm );
275270 }
@@ -321,8 +316,7 @@ private void handleAckNack(long seqNo, boolean multiple,
321316
322317 public void run () {
323318
324- long now ;
325- now = startTime = lastStatsTime = System .currentTimeMillis ();
319+ long now = startTime = lastStatsTime = System .currentTimeMillis ();
326320 msgCount = 0 ;
327321 int totalMsgCount = 0 ;
328322
0 commit comments