Skip to content

Commit

Permalink
Add new dispatch_simulator test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesEbke committed Dec 31, 2013
1 parent 5156c14 commit c4acad0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
8 changes: 8 additions & 0 deletions proof_of_concept/atlas_files/sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@ def count_stuff(filename):
counts['files:' + tag] += x[4]
if x[6]:
counts['events.in:' + tag] += x[6]
counts['events.with.duplicates'] += x[6]
if x[5]:
counts['filesize:' + tag] += x[5]
counts['total.filesize'] += x[5]
if tag.startswith('merge'):
counts['total.merged.filesize'] += x[5]
if tag.startswith('physics'):
counts['total.physics.filesize'] += x[5]
if tag.startswith('recon'):
counts['total.recon.filesize'] += x[5]
return dict(counts)

def get_events_in_files(filename):
Expand Down
18 changes: 17 additions & 1 deletion proof_of_concept/dispatch_simulator/test_dispatch_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,24 @@ def test_multi_massive():
print i, tablet
pass

def test_many_massive():
input_packs = []
for i in range(10):
for j in range(10000):
if i == 3 and j == 1234:
input_packs.append(EmptyDitPack(as_cols(range(i*100+1, (i+1)*100)), as_tabs(range(10*j, 10*(j+1)))))
else:
input_packs.append(EmptyDitPack(as_cols(range(i*100, (i+1)*100)), as_tabs(range(10*j, 10*(j+1)))))
packset = DitPackSet(input_packs)

for i, (tablet, readers) in enumerate(packset.readers_by_tablet()):
if i%100000 == 0:
print i, tablet
pass


def main():
test_multi_massive()
test_many_massive()

if __name__ == "__main__":
main()
Expand Down

0 comments on commit c4acad0

Please sign in to comment.