-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
this will make it work with openstack swift
-c count was already used so -r for repetitions instead
added delete to the test set
cloudfiles.us_authurl added
this will then work in python3 (49) as well
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 ? |
Sorry for the delay, I got pulled off onto other projects. I'll be pulling this in today. Thanks for your contributions! |
default auth url and added -t TEST_DATA_SIZE
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))) |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Added Rackspace US as the default auth url and added -t TEST_DATA_SIZE