Page MenuHomePhabricator
Paste P11640

opusmt locust
ActivePublic

Authored by akosiaris on Tue, Jun 23, 1:57 PM.
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.Tue, Jun 23, 1:57 PM