Created
March 23, 2020 23:50
-
-
Save deanwampler/30da944f8d1cc8cf91c2cfa9f11d1405 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start1 = time.time() | |
ids = [(i, rbusy.remote(1.0), time.time() - start1) for i in range(5)] | |
end1 = time.time() - start1 | |
print('duration1: %6.3f MILLISECONDS' % (1000*end1)) | |
for i,id,t in list(ids): | |
print('%d: %s (time: %6.3f MILLISECONDS)' % (i, id, 1000*t)) | |
start2 = time.time() | |
for i,id,t in list(ids): | |
print('%d: %s (time: %6.3f MILLISECONDS)' % (i, ray.get(id), 1000*(time.time() - start2))) | |
end2 = time.time() - start2 | |
print('duration2: %6.3f seconds' % end2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment