From 10e88d84803c5e1c094a076113461eba97a97af0 Mon Sep 17 00:00:00 2001 From: davebshow <davebshow@gmail.com> Date: Sat, 2 May 2015 19:55:25 -0400 Subject: [PATCH] little fixes in readmes --- README.md | 5 ++++- README.txt | 6 +++--- benchmark.py | 6 ++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d3e03ba..eb2d649 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,10 @@ The Gremlin Server responds with messages in chunks, `GremlinClient.submit` subm >>> loop = asyncio.get_event_loop() >>> gc = GremlinClient('ws://localhost:8182/', loop=loop) # Or even better, use the constructor function. This will init pool connections. ->>> gc = create_client('ws://localhost:8182/', loop=loop) +# ***Must be done inside a coroutine*** +>>> gc = yield from create_client('ws://localhost:8182/', loop=loop) +# Or outside of a coroutine using the loop to help +>>> gc = loop.run_until_complete(create_client(loop=loop)) # Use get. >>> @asyncio.coroutine diff --git a/README.txt b/README.txt index f19f419..68949bf 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,6 @@ -==================================================== +========================================================= aiogremlin - Async Python 3 driver for TP3 Gremlin Server -==================================================== +========================================================= **alpha** @@ -8,4 +8,4 @@ aiogremlin - Async Python 3 driver for TP3 Gremlin Server `Official Documentation`_ -.. _Official Documentation: +.. _Official Documentation: https://github.com/davebshow/aiogremlin diff --git a/benchmark.py b/benchmark.py index 894f2fd..20ac929 100644 --- a/benchmark.py +++ b/benchmark.py @@ -3,8 +3,6 @@ https://github.com/KeepSafe/aiohttp/blob/master/benchmark/async.py """ import argparse import asyncio -import collections -import random import aiogremlin @@ -20,9 +18,9 @@ def run(client, count, concurrency, loop): for x in range(count): try: t1 = loop.time() - resp = yield from execute("1 + 1") + resp = yield from execute("%d" % x) assert resp[0].status_code == 200, resp[0].status_code - assert resp[0].data[0] == 2, resp[0].data[0] + assert resp[0].data[0] == x, resp[0].data[0] t2 = loop.time() processed_count += 1 except Exception: -- GitLab