Skip to content

Commit

Permalink
Add benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvittal committed Jul 12, 2019
1 parent e9dea10 commit bfd521a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions hail/python/hailtop/hailctl/dev/benchmark/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def main(args):
elif module == 'compare':
from .compare import cli
cli.main(args)
elif module == '-h' or module == '--help' or module == 'help':
print_help()
else:
sys.stderr.write(f"ERROR: no such module: {module!r}")
print_help()
Expand Down
2 changes: 1 addition & 1 deletion hail/python/hailtop/hailctl/dev/benchmark/run/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def handler(stats):
if args.tests:
run_list(args.tests, config)
if args.pattern:
run_pattern(args, config)
run_pattern(args.pattern, config)
if not args.pattern and not args.tests:
run_all(config)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ def write_range_table_p10():
ht = hl.utils.range_table(10_000_000, 10)
ht.write(path.join(tmpdir, 'tmp.ht'))

@benchmark
def read_with_index_p50k():
intervals = [hl.Interval(start=i, end=i + 200) for i in range(0, 10_000_000, 200)]
ht = hl.read_table(resource('table_10M_par_10.ht'), _intervals=intervals)
ht._force_count()

@benchmark
def union_p100_p100():
ht1 = hl.read_table(resource('table_10M_par_100.ht'))
Expand Down
2 changes: 2 additions & 0 deletions hail/python/hailtop/hailctl/dev/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def main(args):
if module == 'benchmark':
from .benchmark import cli
cli.main(args)
elif module == '-h' or module == '--help' or module == 'help':
print_help()
else:
sys.stderr.write(f"ERROR: no such module: {module!r}")
print_help()
Expand Down

0 comments on commit bfd521a

Please sign in to comment.