@Test
public void opidExtractionPerformance() {

	final int NUM_TESTS = 100000;
	String[] md = new String[NUM_TESTS];
	
	for (int i = 0; i < NUM_TESTS; i++) {	
		if (rnd.nextBoolean()) {
			// 4-byte opid
			md[i] = new XTraceMetadata(tasks[rnd.nextInt(4)], rnd.nextInt()).toString();
		} else {
			// 8-byte opid
			md[i] = new XTraceMetadata(tasks[rnd.nextInt(4)], rnd.nextLong()).toString();
		}
	}
	
	long startStandard = System.currentTimeMillis();
	for (int i = 0; i < md.length; i++) {
		XTraceMetadata mdobj = XTraceMetadata.createFromString(md[i]);
		String opidstr = mdobj.getOpIdString();
	}
	long endStandard = System.currentTimeMillis();
	
	long startFast = System.currentTimeMillis();
	for (int i = 0; i < md.length; i++) {
		String opidstr = IoUtil.fastOpIdExtraction(md[i]);
	}
	long endFast = System.currentTimeMillis();
	
	System.out.println("Standard completed in " + (endStandard - startStandard) + " ms");
	System.out.println("Fast completed in " + (endFast - startFast) + " ms");
}