Skip to content

Instantly share code, notes, and snippets.

@ek-nath
Created July 21, 2014 07:53
Show Gist options
  • Save ek-nath/5ee3b7a980784089b4ff to your computer and use it in GitHub Desktop.
Save ek-nath/5ee3b7a980784089b4ff to your computer and use it in GitHub Desktop.
pylibrabbitmq noticeable difference in timing data.
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