@@ -214,6 +214,9 @@ public static void main(String[] args) throws IOException {
214214 Option retry = new Option ("retry" , true , "Retry failures n times" );
215215 options .addOption (retry );
216216
217+ Option trackFailures = new Option ("trackFailures" , true , "Track failures" );
218+ options .addOption (trackFailures );
219+
217220 HelpFormatter formatter = new HelpFormatter ();
218221 CommandLineParser parser = new DefaultParser ();
219222 CommandLine cmd ;
@@ -307,12 +310,12 @@ public static void main(String[] args) throws IOException {
307310 for (int i = 0 ; i < ws .workers ; i ++) {
308311 try {
309312 String th_name = "Loader" + i ;
310- boolean trackFailures = false ;
313+ boolean _trackFailures = Boolean . parseBoolean ( cmd . getOptionValue ( "trackFailures" , " false" )) ;
311314 if (Integer .parseInt (cmd .getOptionValue ("retry" , "0" )) > 0 )
312- trackFailures = true ;
315+ _trackFailures = true ;
313316 tm .submit (new WorkLoadGenerate (th_name , dg , client , esClient , cmd .getOptionValue ("durability" , "NONE" ),
314317 Integer .parseInt (cmd .getOptionValue ("maxTTL" , "0" )),
315- cmd .getOptionValue ("maxTTLUnit" , "seconds" ), trackFailures ,
318+ cmd .getOptionValue ("maxTTLUnit" , "seconds" ), _trackFailures ,
316319 Integer .parseInt (cmd .getOptionValue ("retry" , "0" )), null ));
317320 TimeUnit .MILLISECONDS .sleep (500 );
318321 } catch (Exception e ) {
0 commit comments