Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P11640
opusmt locust
Active
Public
Actions
Authored by
akosiaris
on Jun 23 2020, 1:57 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F31876406: raw.txt
Jun 23 2020, 1:57 PM
2020-06-23 13:57:58 (UTC+0)
Subscribers
None
from
locust
import
HttpUser
,
task
,
between
class
OpusUser
(
HttpUser
):
wait_time
=
between
(
1
,
2
)
@task
def
translate
(
self
):
self
.
client
.
post
(
'/api/translate'
,
None
,
json
=
{
"from"
:
"en"
,
"to"
:
"ml"
,
"source"
:
"One morning, when Gregor Samsa woke from"
"troubled dreams, he found himself tranformed in his"
"bed into a horrible vermin"
,
},
headers
=
{
"authority"
:
"opusmt.wmflabs.org"
,
"content-type"
:
"application/json"
,
"origin"
:
"https://opusmt.wmflabs.org"
,
},
)
Event Timeline
akosiaris
created this paste.
Jun 23 2020, 1:57 PM
2020-06-23 13:57:58 (UTC+0)
Log In to Comment