Skip to content
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

default auth url and added -t TEST_DATA_SIZE #3

Merged
merged 13 commits into from
Aug 7, 2013
Merged

default auth url and added -t TEST_DATA_SIZE #3

merged 13 commits into from
Aug 7, 2013

Conversation

benroeder
Copy link
Contributor

Added Rackspace US as the default auth url and added -t TEST_DATA_SIZE

@benroeder
Copy link
Contributor Author

I have made all of the clean ups you asked for and also added the default auth point, so that it has the same default behaviour. Do I need to make any other changes ?

@claymation
Copy link
Owner

Sorry for the delay, I got pulled off onto other projects. I'll be pulling this in today. Thanks for your contributions!

claymation added a commit that referenced this pull request Aug 7, 2013
default auth url and added -t TEST_DATA_SIZE
@claymation claymation merged commit b7f0cb5 into claymation:master Aug 7, 2013
print 'Pinging Rackspace cloudfiles (sending request every %d seconds):' % ping_interval
print '%10s %10s %10s %10s %10s %10s %10s' % ('seq. #', 'connect', 'container', 'create', 'write', 'read', 'total')

print 'Pinging storage (sending request every %d seconds with %s ):' % (ping_interval, sizeof_fmt(sys.getsizeof(TEST_DATA)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why sys.getsizeof() and not len?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size of the strings is different on different platforms.
On OS X

TEST_DATA = 'The quick brown fox jumps over the lazy dog.'
import sys
sys.getsizeof(TEST_DATA)
81
len(TEST_DATA)
44

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But sys.getsizeof() returns the size of Python's internal data structure, not the number of characters in the string, which is ultimately what matters. If you intend to send 1000 characters, a str with len 1000 will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed it to len

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants