public void executeBench ( final Object objToExecute , final Object ... args ) { final double [ ] meterResults = new double [ METERS_TO_BENCH . size ( ) ] ; final Method meth = element . getMethodToBench ( ) ; int meterIndex1 = 0 ; int meterIndex2 = 0 ; for ( final AbstractMeter meter : METERS_TO_BENCH ) { meterResults [ meterIndex1 ] = meter . getValue ( ) ; meterIndex1 ++ ; } final PerfidixMethodInvocationException res = invokeMethod ( objToExecute , Bench . class , meth , args ) ; for ( final AbstractMeter meter : METERS_TO_BENCH ) { meterResults [ meterIndex2 ] = meter . getValue ( ) - meterResults [ meterIndex2 ] ; meterIndex2 ++ ; } if ( res == null ) { meterIndex1 = 0 ; for ( final AbstractMeter meter : METERS_TO_BENCH ) { BENCHRES . addData ( element , meter , meterResults [ meterIndex1 ] ) ; meterIndex1 ++ ; } } else { BENCHRES . addException ( res ) ; } }
Execution of bench method . All data is stored corresponding to the meters .