from swh.objstorage.factory import get_objstorage               
import yaml                                                     
config = yaml.load(open("../swh-vault/vault.yml"))["objstorage"]
objstorage = get_objstorage(**config)                           
for _ in range(1000):                                           
    objstorage.get("174bdc9a03300e46d632b68ebd0e8901b63355ea")  


"""
results for each implementation of get():

fully synchronous:         30.90s user 0.79s system 29% cpu 1:48.52 total
call get_batch:            33.84s user 0.85s system 27% cpu 2:06.83 total
fully synchronous:         37.02s user 0.98s system 33% cpu 1:52.59 total
call get_batch:            32.71s user 1.06s system 30% cpu 1:49.04 total
direct call to _get_async: 32.78s user 1.05s system 30% cpu 1:49.16 total
"""