Performance performance = Performance.getDefault(); performance.tagAsGlobalSummary(meter, "Create 1000 composites", Dimension.CPU_TIME);
public void test_createComposites() {	PerformanceMeter meter = createMeter("Create 1000 composites");	int samples;		// Warm up.	for(samples = 0; samples < 2; samples++) {		Shell shell = new Shell(display);		shell.setLayout(new FillLayout());		for (int i = 0; i < 100; i++) {			Composite c = new Composite(shell, SWT.NONE);			c.setLayout(new FillLayout());			for (int j = 0; j < 10; j++) {				Composite c2 = new Composite(c, SWT.NONE);			}		}		shell.dispose();		while(display.readAndDispatch());	}	for(samples = 0; samples < 10; samples++) {		Shell shell = new Shell(display);		shell.setLayout(new FillLayout());		meter.start();		for (int i = 0; i < 100; i++) {			Composite c = new Composite(shell, SWT.NONE);			c.setLayout(new FillLayout());			for (int j = 0; j < 10; j++) {				Composite c2 = new Composite(c, SWT.NONE);			}		}		meter.stop();		shell.dispose();		while(display.readAndDispatch());	}		disposeMeter(meter);}