-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paginator docs #645
Paginator docs #645
Conversation
I primarily have the same question as the waiter doc PR. I'm not sure if we want to create a new class on every single call to get_paginator. I know do that for |
Doing some performance testing with the paginators as well. Here are some preliminary results in terms of speed. I used this script: import time
import botocore.session
session = botocore.session.get_session()
s3 = session.create_client('s3')
total = 0
iterations = 5
for i in range(iterations):
start_time = time.time()
s3.get_paginator('list_objects')
end_time = time.time()
diff = end_time - start_time
print('%s round instantiation: %s seconds' % (i, diff))
total += diff
average = total/iterations
print('Average %f seconds' % average) For the develop branch, I got these results:
For my PR I got:
So in terms of speed it looks like it was only affected by a little. |
3bc0cb9
to
78ed64b
Compare
So I ran some memory leak tests similiarly to what I did for the waiter docstring pull request. Here is my results for s3 ListObjects paginator. I ran each test five times and took the average difference between the end memory usage and the beginning memory usage (i.e. develop PR Surprisingly the memory leakage decreased for one of the tests using my PR. Similarly to the Waiter docstring PR, I do not think we need to cache the Paginator class. Thoughts? |
Also renamed the paginator class name to fall in line with what is in the documentation for a specific paginator.
Change was made to be more pythonic and consistent with Waiter class names.
6e4d569
to
ed763a2
Compare
|
Add docstrings to paginator's
paginate
method. It also renames the paginator class returned from client to a class that falls in line with what is in the documentation e.g.S3.Paginator.list_objects
.I realize that I have a lot of PRs out right now and many depend on the other. This is the order in which how I would like to see them reviewed/merged:
Or you can just review this one, which accounts for 1 through 3.
cc @jamesls @mtdowling @rayluo