def benchmark_lsh(threshold, index_data, query_data):
    print("Building LSH index")
    num_perm = len(index_data.minhashes[0].hashvalues)
    lsh = MinHashLSH(threshold, num_perm)
    for key, minhash in zip(index_data.filenames, index_data.minhashes):
        lsh.insert(key, minhash)
    print("Querying")
    times = []
    results = []
    for minhash in query_data.minhashes:
        start = time.clock()
        result = lsh.query(minhash)
        duration = start - time.clock()
        times.append(duration)
        results.append(result)
    return times, results
dataset/ETHPy150Open ekzhu/datasketch/benchmark/lsh_benchmark.py/benchmark_lsh/swapped operands of `-`