tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
374 stars 44 forks source link

Benchmarks are broken? #19

Open sajith opened 3 years ago

sajith commented 3 years ago

zfec's README does not say much about actually running the bechmarks (except that "to run the benchmarks, execute the included bench/bench_zfec.py script with optional --k= and --m= arguments"), but running bench/bench_zfec.py results in:

$ python ./bench/bench_zfec.py 
measuring encoding of data with K=3, M=10, reporting results in nanoseconds per byte after encoding 1000000 bytes 64 times in a row...
Traceback (most recent call last):
  File "./bench/bench_zfec.py", line 109, in <module>
    bench(k, m)
  File "./bench/bench_zfec.py", line 91, in bench
    results = benchutil.rep_bench(f, n=BSIZE, initfunc=_init_func, MAXREPS=MAXREPS, MAXTIME=None, UNITS_PER_SECOND=1000000000)
TypeError: rep_bench() got an unexpected keyword argument 'MAXREPS'

Also:

9crk commented 2 years ago

是的,可能是版本问题,需要修改91行的内容MAXREPS=MAXREPS, MAXTIME=None, 改成 runreps=MAXREPS,。我运行成功了: zhouhua@mbp bench%python2.7 bench_zfec.py --k=9 --m=10 measuring encoding of data with K=9, M=10, reporting results in nanoseconds per byte after encoding 1000000 bytes 64 times in a row... best: 3.713e-01, 3th-best: 3.713e-01, mean: 3.723e-01, 3th-worst: 3.724e-01, worst: 3.773e-01 (of 10) and now represented in MB/s...

best: 2693.269 MB/sec mean: 2685.681 MB/sec worst: 2650.638 MB/sec