private void escapeStrings(int sizeInK) {
        for (int i=0; i<1000*sizeInK; i++) {
            XML.xmlEscape("foobar" + i,true,true,'\u001f');
        }
    }
It is what it says

@author bratseth
vespajlib/developernotes/XMLMicroBenchmark.java