background image

    addTestStr = "";  

    for (int innerIndex=0;innerIndex<=INNER_ITERATION;innerIndex++)  

    addTestStr += "*";  

    stopWatch.stop();  

}        

for (int outerIndex=0;outerIndex<=OUTER_ITERATION;outerIndex++) {  

    StopWatch stopWatch = new LoggingStopWatch("StringConcat";  

    concatTestStr = "";  

    for (int innerIndex=0;innerIndex<=INNER_ITERATION;innerIndex++)  

    concatTestStr.concat("*";  

    stopWatch.stop();  

}  

for (int outerIndex=0;outerIndex<=OUTER_ITERATION;outerIndex++) {  

    StopWatch stopWatch = new LoggingStopWatch("StringBufferConcat";  

    concatTestSb = new StringBuffer();  

    for (int innerIndex=0;innerIndex<=INNER_ITERATION;innerIndex++)  

    concatTestSb.append("*";  

    stopWatch.stop();  

}  

for (int outerIndex=0;outerIndex<=OUTER_ITERATION;outerIndex++) {  

    StopWatch stopWatch = new LoggingStopWatch("StringBuilderConcat";  

    concatTestSbu = new StringBuilder();