itzikff / namebench

Automatically exported from code.google.com/p/namebench
Apache License 2.0
0 stars 0 forks source link

-x chunk fails if the number of tests selected is equal to or greater than the source #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. Run ./namebench.py -t10000 -xchunk 

Traceback (most recent call last):
  File "./namebench.py", line 182, in <module>
    bmark.CreateTestsFromFile(opt.data_file, select_mode=opt.select_mode)
  File "/data/home/tstromberg/namebench/lib/benchmark.py", line 114, in
CreateTestsFromFile
    return self.CreateTests(input_data, select_mode=select_mode)
  File "/data/home/tstromberg/namebench/lib/benchmark.py", line 136, in
CreateTests
    selected = ChunkSelect(input_data, self.test_count)
  File "/data/home/tstromberg/namebench/lib/benchmark.py", line 91, in
ChunkSelect
    start = random.randint(0, len(elements) - count)
  File "/usr/local/lib/python2.6/random.py", line 228, in randint
    return self.randrange(a, b+1)
  File "/usr/local/lib/python2.6/random.py", line 204, in randrange
    raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart,
istop, width)
ValueError: empty range for randrange() (0,-131, -131)

Original issue reported on code.google.com by thomas.r...@gmail.com on 1 Oct 2009 at 4:40

GoogleCodeExporter commented 8 years ago
fixed in r131

Original comment by thomas.r...@gmail.com on 2 Oct 2009 at 9:28