Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Goblin OGM
AIO Gremlin
Commits
d0b3031a
Commit
d0b3031a
authored
Jun 30, 2015
by
davebshow
Browse files
updated benchmark for new api
parent
d451d85d
Changes
1
Hide whitespace changes
Inline
Side-by-side
benchmark.py
View file @
d0b3031a
...
...
@@ -75,19 +75,19 @@ ARGS.add_argument(
help
=
'number of tests (default: `%(default)s`)'
)
ARGS
.
add_argument
(
'-n'
,
'--count'
,
action
=
"store"
,
nargs
=
'?'
,
type
=
int
,
default
=
10
000
,
nargs
=
'?'
,
type
=
int
,
default
=
5
000
,
help
=
'message count (default: `%(default)s`)'
)
ARGS
.
add_argument
(
'-c'
,
'--concurrency'
,
action
=
"store"
,
nargs
=
'?'
,
type
=
int
,
default
=
100
,
nargs
=
'?'
,
type
=
int
,
default
=
8
,
help
=
'count of parallel requests (default: `%(default)s`)'
)
ARGS
.
add_argument
(
'-p'
,
'--poolsize'
,
action
=
"store"
,
nargs
=
'?'
,
type
=
int
,
default
=
100
,
nargs
=
'?'
,
type
=
int
,
default
=
8
,
help
=
'num connected websockets (default: `%(default)s`)'
)
ARGS
.
add_argument
(
'-w'
,
'--warmups'
,
action
=
"store"
,
nargs
=
'?'
,
type
=
int
,
default
=
5
,
nargs
=
'?'
,
type
=
int
,
default
=
10
,
help
=
'num warmups (default: `%(default)s`)'
)
...
...
@@ -100,11 +100,8 @@ if __name__ == "__main__":
num_warmups
=
args
.
warmups
loop
=
asyncio
.
get_event_loop
()
t1
=
loop
.
time
()
factory
=
aiogremlin
.
GremlinFactory
()
client
=
loop
.
run_until_complete
(
aiogremlin
.
create_client
(
loop
=
loop
,
factory
=
factory
,
poolsize
=
poolsize
))
conn
=
aiogremlin
.
GremlinConnector
(
limit
=
poolsize
)
client
=
aiogremlin
.
GremlinClient
(
ws_connector
=
conn
)
t2
=
loop
.
time
()
print
(
"time to establish conns: {}"
.
format
(
t2
-
t1
))
try
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment