def container_convergence(results, limit):
 convergence_results = [r for r in results if ((r['metric']['type'] == 'wallclock') and (r['operation']['type'] == 'create-container'))]
 num_convergences = len(convergence_results)
 if (num_convergences > 0):
  convergences_within_limit = [r for r in convergence_results if (r['value'] <= limit)]
  return (float(len(convergences_within_limit)) / num_convergences)
 return None

def container_convergence ( results , limit ) : convergence_results = [ r for r in results if ( ( r [ 'metric' ] [ 'type' ] == 'wallclock' ) and ( r [ 'operation' ] [ 'type' ] == 'create-container' ) ) ] num_convergences = len ( convergence_results ) if ( num_convergences > 0 ) : convergences_within_limit = [ r for r in convergence_results if ( r [ 'value' ] <= limit ) ] return ( float ( len ( convergences_within_limit ) ) / num_convergences ) return None
calculate the percentage of containers that converge within a given time period .