def wallclock_for_operation(results, operation):
 operation_results = itertools.ifilter((lambda r: ((r['metric']['type'] == 'wallclock') and (r['operation']['type'] == operation))), results)
 values = [r['value'] for r in operation_results]
 return mean(values)

def wallclock_for_operation ( results , operation ) : operation_results = itertools . ifilter ( ( lambda r : ( ( r [ 'metric' ] [ 'type' ] == 'wallclock' ) and ( r [ 'operation' ] [ 'type' ] == operation ) ) ) , results ) values = [ r [ 'value' ] for r in operation_results ] return mean ( values )
calculate the wallclock time for a process running in a particular scenario .