testing performance of constrained sampling