Well, you can go through
this thread, look at
johnIV's mameUI benchmark page, or look at the
mame benchmark site. There are a few small differences in the settings between the three, but pretty much the same.
Quick run: use mame option -str (-seconds_to_run) to have mame run that amount of time; between 1.5 to 2 minutes should be enough. The rest of the settings, IMO, should then be as follows:
If you want to compare your system vs another's, make sure to match all the settings that other system used.
If you want to test if different games are "runnable" on your system, set all the other settings to what you want to use.
If you want to test how different settings effect your system, run with as many combinations of the settings you want to test as you can.
If you want to compare different mame versions on your system, either make sure the two versions use the same settings, or use as close to the respective versions' default settings.