Commit 6769c3d2 authored by davebshow's avatar davebshow
Browse files

streamling eof data flow

parent f09082f7
......@@ -162,10 +162,16 @@ class GremlinResponseStream:
@asyncio.coroutine
def read(self):
if self._queue.at_eof():
# For 3.0.0.M9
# if self._queue.at_eof():
# self._conn.feed_pool()
# message = None
# else:
# This will be different 3.0.0.M9
yield from self._conn._receive()
if self._queue.is_eof():
self._conn.feed_pool()
message = None
else:
yield from self._conn._receive()
message = yield from self._queue.read()
return message
......@@ -22,10 +22,12 @@ def gremlin_response_parser(out, buf):
message["status"]["message"])
if message.status_code == 200:
out.feed_data(message)
# For 3.0.0.M9
# out.feed_eof()
# This will be terminated in 3.0.0.M9
elif message.status_code == 299:
out.feed_data(message)
out.feed_eof()
# For 3.0.0.M9
# elif message.status_code == 206:
# out.feed_data(message)
# elif message.status_code == 204:
......
......@@ -79,11 +79,11 @@ ARGS.add_argument(
help='message count (default: `%(default)s`)')
ARGS.add_argument(
'-c', '--concurrency', action="store",
nargs='?', type=int, default=256,
nargs='?', type=int, default=100,
help='count of parallel requests (default: `%(default)s`)')
ARGS.add_argument(
'-p', '--poolsize', action="store",
nargs='?', type=int, default=256,
nargs='?', type=int, default=100,
help='num connected websockets (default: `%(default)s`)')
ARGS.add_argument(
'-w', '--warmups', action="store",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment