Created
July 21, 2014 07:53
-
-
Save ek-nath/5ee3b7a980784089b4ff to your computer and use it in GitHub Desktop.
pylibrabbitmq noticeable difference in timing data.
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
from datetime import datetime | |
import librarbbitmq | |
msg = 'x'*20000 | |
M_PROP = {'delivery_mode': 1} | |
connection = librabbitmq.connecetion(...) | |
channel = connection.channel() | |
start = datetime.now() | |
for _ in xrange(count): | |
connection._basic_publish(1, msg, X, RK, M_PROP, False, False) | |
end1 = datetime.now() | |
channel.close() | |
end2 = datetime.now() | |
print end1-start, end2-start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment