def benchmark(func, ref, threshold, fcmp):
    nb = 0
    idx = 0
    tres = 0.0
    t1 = time.clock()
    for i in itertools.permutations(ref):
        perm = ''.join(j for j in i)
        res = func(ref, perm)
        tres += res
        if fcmp(res, threshold):
            nb += 1
        idx += 1
    t2 = time.clock()

    return tres/idx, nb, idx, t1 - t2
dataset/ETHPy150Open androguard/androguard/elsim/tests/test_similarity.py/benchmark/swapped operands of `-`