Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P8511
termbox.py
Active
Public
Actions
Authored by
akosiaris
on May 10 2019, 1:10 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
Wikidata-Termbox
serviceops
Wikidata
Referenced Files
F29003816: raw.txt
May 10 2019, 1:10 PM
2019-05-10 13:10:35 (UTC+0)
Subscribers
None
from
locust
import
HttpLocust
,
TaskSet
def
info
(
l
):
l
.
client
.
get
(
'/_info'
)
def
wellformed
(
l
):
l
.
client
.
get
(
'/termbox?language=de&entity=Q42&revision=932235876&editLink=sdfsf&preferredLanguages=de|en|el|cy'
)
def
malformed
(
l
):
with
l
.
client
.
get
(
'/termbox?language=de&entity=Q42&preferredLanguages=de|en|el|cy'
,
catch_response
=
True
)
as
response
:
if
response
.
status_code
==
400
:
response
.
success
()
def
doesnotexist
(
l
):
with
l
.
client
.
get
(
'/termbox?language=de&entity=Q100&revision=2314324&editLink=sdfdsf&preferredLanguages=de|en|el|cy'
,
catch_response
=
True
)
as
response
:
if
response
.
status_code
==
404
:
response
.
success
()
class
UserBehavior
(
TaskSet
):
tasks
=
{
info
:
4
,
wellformed
:
94
,
malformed
:
1
,
doesnotexist
:
1
,
}
class
WebsiteUser
(
HttpLocust
):
task_set
=
UserBehavior
min_wait
=
1000
max_wait
=
2000
Event Timeline
akosiaris
created this paste.
May 10 2019, 1:10 PM
2019-05-10 13:10:35 (UTC+0)
akosiaris
mentioned this in
T220402: Introduce wikidata termbox SSR to kubernetes
.
May 10 2019, 1:16 PM
2019-05-10 13:16:09 (UTC+0)
Log In to Comment