Benchmark a single mitdb record

def benchmark_mitdb_record(rec, detector, verbose):
    """
    Benchmark a single mitdb record
    """
    sig, fields = rdsamp(rec, pb_dir='mitdb', channels=[0])
    ann_ref = rdann(rec, pb_dir='mitdb', extension='atr')

    qrs_inds = detector(sig=sig[:,0], fs=fields['fs'], verbose=verbose)

    comparitor = compare_annotations(ref_sample=ann_ref.sample[1:],
                                     test_sample=qrs_inds,
                                     window_width=int(0.1 * fields['fs']))
    if verbose:
        print('Finished record %s' % rec)
    return comparitor