public void benchmarks ( File fllFileList , File fldFileList , int runs , Writer writer ) throws Exception { List < String > fllFiles = new ArrayList < String > ( ) ; List < String > fldFiles = new ArrayList < String > ( ) ; { BufferedReader fllReader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( fllFileList ) , FuzzyLite . UTF_8 ) ) ; BufferedReader fldReader = new BufferedReader ( new InputStreamReader ( new FileInputStream ( fldFileList ) , FuzzyLite . UTF_8 ) ) ; try { String fllLine , fldLine ; while ( ( fllLine = fllReader . readLine ( ) ) != null && ( fldLine = fldReader . readLine ( ) ) != null ) { fllLine = fllLine . trim ( ) ; fldLine = fldLine . trim ( ) ; if ( fllLine . isEmpty ( ) || fllLine . charAt ( 0 ) == ' ' ) { continue ; } fllFiles . add ( fllLine ) ; fldFiles . add ( fldLine ) ; } } catch ( Exception ex ) { throw ex ; } finally { fllReader . close ( ) ; fldReader . close ( ) ; } } if ( writer != null ) { writer . write ( Op . join ( new Benchmark ( ) . header ( runs , true ) , "\t" ) + "\n" ) ; writer . flush ( ) ; } else { System . out . println ( Op . join ( new Benchmark ( ) . header ( runs , true ) , "\t" ) ) ; } for ( int i = 0 ; i < fllFiles . size ( ) ; ++ i ) { if ( writer != null ) { FuzzyLite . logger ( ) . log ( Level . INFO , "Benchmark {0}/{1}: {2}" , new Object [ ] { i + 1 , fllFiles . size ( ) , fllFiles . get ( i ) } ) ; } benchmark ( new File ( fllFiles . get ( i ) ) , new File ( fldFiles . get ( i ) ) , runs , writer ) ; } }
Benchmarks the list of engines against the list of datasets both described as absolute or relative paths