diff --git a/scripts/load_testing.py b/scripts/load_testing.py new file mode 100644 index 00000000..d879bd08 --- /dev/null +++ b/scripts/load_testing.py @@ -0,0 +1,318 @@ +#! /usr/bin/python3 +import json +import os, stat, time +import urllib3 +import shutil +import random +import string +from tqdm import tqdm + +def main(): + start = time.time() + SERVAL_AUTH_URL = os.environ.get("SERVAL_AUTH_URL") + SERVAL_CLIENT_ID = os.environ.get("SERVAL_CLIENT_ID") + SERVAL_CLIENT_SECRET = os.environ.get("SERVAL_CLIENT_SECRET") + REQUESTS_PER_SECOND = 5 + NUM_CONCURRENT_CONNECTIONS = 20 + NUM_NMT_ENGINES_TO_ADD = 10_000 + NUM_SMT_ENGINES_TO_ADD = 500 + + base_url = "localhost" #"https://qa-int.serval-api.org" + + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + + print('Fetching authorization token...') + data = { + "client_id": f"{SERVAL_CLIENT_ID}", + "client_secret":f"{SERVAL_CLIENT_SECRET}", + "audience":"https://machine.sil.org", + "grant_type":"client_credentials" + } + + encoded_data = json.dumps(data).encode('utf-8') + + http = urllib3.PoolManager() #Use the following parameters if base_url is not localhost: cert_reqs='CERT_NONE', assert_hostname=False + r:urllib3.response.HTTPResponse =http.request( + 'POST', + f'{SERVAL_AUTH_URL}/oauth/token', + body=encoded_data, + headers={"content-type": "application/json"} + ) + access_token = json.loads(r.data.decode('utf-8'))['access_token'] + + src_id = "" + trg_id = "" + + print('Setting up bombardier...') + bombardier_path_to_exe = 'load_testing_data/bombardier-linux-amd64' + if not os.path.exists(bombardier_path_to_exe): + with http.request('GET', 'https://github.com/codesenberg/bombardier/releases/download/v1.2.6/bombardier-linux-amd64', preload_content=False) as r, open(bombardier_path_to_exe, 'wb') as out_file: + shutil.copyfileobj(r, out_file) + + os.chmod(bombardier_path_to_exe, mode=stat.S_IXUSR) + try: + print('Bombarding get all translation engines endpoint...') + os.system( + "./" + + bombardier_path_to_exe + + f' --print r -k -l -d 60s -r {REQUESTS_PER_SECOND} -c {NUM_CONCURRENT_CONNECTIONS} -H "authorization: Bearer {access_token}" -H "accept: application/json" -m "GET" "{base_url}/api/v1/translation/engines"') + + print("Posting engines to DB...") + nmt_engine_ids:set[str] = set() + smt_engine_ids:set[str] = set() + def post_nmt_engine(): + r:urllib3.response.HTTPResponse =http.request( + 'POST', + f'{base_url}/api/v1/translation/engines', + body = json.dumps({"name": "load_testing_engine", "targetLanguage": "en_Latn", "sourceLanguage" : "ell_Grek", "type":"Nmt"}).encode('utf-8'), + headers={"content-type": "application/json", "accept":"application/json", "authorization" : f"Bearer {access_token}"} + ) + nmt_engine_ids.add(json.loads(r.data.decode('utf-8'))['id']) + + print("Posting NMT") + for _ in tqdm(range(NUM_NMT_ENGINES_TO_ADD)): + post_nmt_engine() + + def post_smt_engine(): + r:urllib3.response.HTTPResponse =http.request( + 'POST', + f'{base_url}/api/v1/translation/engines', + body = json.dumps({"name": "load_testing_engine", "targetLanguage": "en_Latn", "sourceLanguage" : "ell_Grek", "type":"SmtTransfer"}).encode('utf-8'), + headers={"content-type": "application/json", "accept":"application/json", "authorization" : f"Bearer {access_token}"} + ) + smt_engine_ids.add(json.loads(r.data.decode('utf-8'))['id']) + + print("Posting SMT") + for _ in tqdm(range(NUM_SMT_ENGINES_TO_ADD)): + post_smt_engine() + + #use bombadier get + print('Bombarding get all translation engines endpoint after adding docs...') + os.system( + "./" + + bombardier_path_to_exe + + f' --print r -k -l -d 60s -r {REQUESTS_PER_SECOND} -c {NUM_CONCURRENT_CONNECTIONS} -H "authorization: Bearer {access_token}" -H "accept: application/json" -m "GET" "{base_url}/api/v1/translation/engines"') + #add necessary files + print('Adding corpus to smt engine...') + with open('load_testing_data/testsrc.txt', 'r') as src_file: + src_data = src_file.read() + r:urllib3.response.HTTPResponse =http.request_encode_body( + 'POST', + f'{base_url}/api/v1/files', + fields={ + 'file': ('testsrc.txt', src_data, 'text/plain'), + 'format':'Text' + }, + headers={'accept' : 'application/json', "authorization" : f"Bearer {access_token}"}, + encode_multipart=True + ) + src_id = json.loads(r.data.decode('utf-8'))['id'] + + with open('load_testing_data/testtarg.txt', 'r') as targ_file: + targ_data = targ_file.read() + r:urllib3.response.HTTPResponse =http.request( + 'POST', + f'{base_url}/api/v1/files', + fields={'file':('testtarg.txt', targ_data, 'text/plain'), 'format':'Text'}, + headers={'accept': 'application/json', "authorization" : f"Bearer {access_token}"} + ) + trg_id = json.loads(r.data.decode('utf-8'))['id'] + + print("Building an SMT engine for bombardment...") + #add corpora and build an smt + smt_id = list(smt_engine_ids)[0] + http.request( + 'POST', + f'{base_url}/api/v1/translation/engines/{smt_id}/corpora', + body=json.dumps( + { + "sourceLanguage":"ell_Grek", + "targetLanguage":"en_Latn", + "sourceFiles": + [ + { + "fileId" : src_id, + "textId":"all" + } + ], + "targetFiles": + [ + { + "fileId" : trg_id, + "textId":"all" + } + ] + }).encode('utf-8'), + headers={'content-type':'application/json', 'accept': 'application/json', "authorization" : f"Bearer {access_token}"} + ) + # corpus_id = json.loads(r.data.decode('utf-8'))['id'] + r:urllib3.response.HTTPResponse = http.request( + 'POST', + f'{base_url}/api/v1/translation/engines/{smt_id}/builds', + body=json.dumps({}).encode('utf-8'), + headers={"authorization" : f"Bearer {access_token}", 'content-type':'application/json'} + ) + + #waiting for build + is_built = False + retry_index = 0 + while not is_built: + r:urllib3.response.HTTPResponse = http.request( + 'GET', + f'{base_url}/api/v1/translation/engines/{smt_id}/current-build', + headers={"authorization" : f"Bearer {access_token}"} + ) + is_built = r.status == 204 + if r.status//100 != 2: + raise Exception(f"Received response of {r.status} while trying to build engine; cannot continue testing!") + if retry_index > 15: + r:urllib3.response.HTTPResponse = http.request( + 'POST', + f'{base_url}/api/v1/translation/engines/{smt_id}/current-build/cancel', + headers={"authorization" : f"Bearer {access_token}"} + ) + + print("Engine is taking too long to build to continue testing. Cancelling build...") + raise Exception("Engine is taking too long to build to continue testing. Cancelling build...") + time.sleep(60 if retry_index == 0 else 20*retry_index) + retry_index += 1 + + segment_file_name = "".join(random.choices(string.ascii_letters, k=24)) + '.json' + f = open(segment_file_name, 'w', encoding='utf-8') + f.write(json.dumps("Βίβλος γενέσεως Ἰησοῦ Χριστοῦ")) + f.flush() + f.close() + + #bombard get word graph + print("Bombarding word graph endpoint...") + os.system( + "./" + + bombardier_path_to_exe + + f' --print r -k -l -d 60s -r {REQUESTS_PER_SECOND} -c {NUM_CONCURRENT_CONNECTIONS} -H "authorization: Bearer {access_token}" -H "accept: application/json" -H "content-type: application/json" -m "POST" "{base_url}/api/v1/translation/engines/{smt_id}/get-word-graph" ' + + f'-f "{segment_file_name}"' + ) + + os.remove(segment_file_name) + + nmt_id = list(nmt_engine_ids)[0] + + print("Building NMT engine...") + r:urllib3.response.HTTPResponse = http.request( + 'POST', + f'{base_url}/api/v1/translation/engines/{nmt_id}/corpora', + body=json.dumps( + { + "sourceLanguage":"ell_Grek", + "targetLanguage":"en_Latn", + "sourceFiles": + [ + { + "fileId" : src_id, + "textId":"all" + } + ], + "targetFiles": + [ + { + "fileId" : trg_id, + "textId":"all" + } + ] + }).encode('utf-8'), + headers={'content-type':'application/json', 'accept': 'application/json', "authorization" : f"Bearer {access_token}"} + ) + + corpus_id = json.loads(r.data.decode('utf-8'))['id'] + + r:urllib3.response.HTTPResponse = http.request( + 'POST', + f'{base_url}/api/v1/translation/engines/{nmt_id}/builds', + body=json.dumps( + { + "pretranslate" : [ + { + "corpusId": corpus_id, + "textIds": [ + "all" + ] + } + ], + "options":"{\"max_steps\":10}" + } + ), + headers={"authorization" : f"Bearer {access_token}", 'content-type':'application/json'} + ) + + #waiting for build + is_built = False + retry_index = 0 + while not is_built: + r:urllib3.response.HTTPResponse = http.request( + 'GET', + f'{base_url}/api/v1/translation/engines/{nmt_id}/current-build', + headers={"authorization" : f"Bearer {access_token}"} + ) + is_built = r.status == 204 + if r.status//100 != 2: + raise Exception(f"Received response of {r.status} while trying to build engine; cannot continue testing!") + if retry_index > 15: + print("Engine is taking too long to build to continue testing. Cancelling build...") + r:urllib3.response.HTTPResponse = http.request( + 'POST', + f'{base_url}/api/v1/translation/engines/{nmt_id}/current-build/cancel', + headers={"authorization" : f"Bearer {access_token}"} + ) + raise Exception("Engine is taking too long to build to continue testing. Cancelling build...") + time.sleep(240 if retry_index == 0 else 60*retry_index) + retry_index += 1 + + print("Bombarding pretranslation endpoint...") + #bombard get pretrans + os.system( + "./" + + bombardier_path_to_exe + + f' --print r -k -l -d 60s -r {REQUESTS_PER_SECOND} -c {NUM_CONCURRENT_CONNECTIONS} -H "authorization: Bearer {access_token}" -H "accept: application/json" -m "GET" "{base_url}/api/v1/translation/engines/{nmt_id}/corpora/{corpus_id}/pretranslations" ' + ) + except Exception as e: + print("Something went wrong:", str(e) if str(e) != "" else "[No information]") + finally: + #cleanup files, smt, nmt, bombardier + print('Cleaning up...') + print('Deleting added translation engines...') + def delete_engine(engine_id): + r:urllib3.response.HTTPResponse =http.request( + 'DELETE', + f'{base_url}/api/v1/translation/engines/{engine_id}', + body = json.dumps({"id":engine_id}).encode('utf-8'), + headers={"content-type": "application/json", "authorization" : f"Bearer {access_token}"} + ) + if(r.status != 200): + print(f"Failed to delete engine {engine_id}") + + for engine_id in tqdm(nmt_engine_ids): + delete_engine(engine_id) + for engine_id in tqdm(smt_engine_ids): + delete_engine(engine_id) + + r:urllib3.response.HTTPResponse =http.request( + 'DELETE', + f'{base_url}/api/v1/files/{src_id}', + headers={"content-type": "application/json", "authorization" : f"Bearer {access_token}"} + ) + if(r.status != 200): + print(f"Failed to delete file {src_id}") + + r:urllib3.response.HTTPResponse =http.request( + 'DELETE', + f'{base_url}/api/v1/files/{trg_id}', + headers={"content-type": "application/json", "authorization" : f"Bearer {access_token}"} + ) + if(r.status != 200): + print(f"Failed to delete file {trg_id}") + + + os.remove(bombardier_path_to_exe) + print("Finished testing in", round((time.time()-start)/60, 2), "minutes.") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/scripts/load_testing_data/testsrc.txt b/scripts/load_testing_data/testsrc.txt new file mode 100644 index 00000000..0615bc6d --- /dev/null +++ b/scripts/load_testing_data/testsrc.txt @@ -0,0 +1,31 @@ +h_001 ΙΟΥΔΑ ss +mt1_001 ΙΟΥΔΑ +mt1_002 ΕΠΙΣΤΟΛΗ ΚΑΘΟΛΙΚΗ +toc1_001 ΙΟΥΔΑ ΕΠΙΣΤΟΛΗ ΚΑΘΟΛΙΚΗ +toc2_001 ΙΟΥΔΑ +toc3_001 ΙΟΥΔΑ +verse_001_001 Ἰούδας Ἰησοῦ Χριστοῦ δοῦλος , ἀδελφὸς δὲ Ἰακώβου , τοῖς ἐν Θεῷ πατρὶ ἡγιασμένοις , καὶ Ἰησοῦ Χριστῷ τετηρημένοις , κλητοῖς · +verse_001_002 ἔλεος ὑμῖν καὶ εἰρήνη καὶ ἀγάπη πληθυνθείη . +verse_001_003 Ἀγαπητοί , πᾶσαν σπουδὴν ποιούμενος γράφειν ὑμῖν περὶ τῆς κοινῆς σωτηρίας , ἀνάγκην ἔσχον γράψαι ὑμῖν , παρακαλῶν ἐπαγωνίζεσθαι τῇ ἅπαξ παραδοθείσῃ τοῖς ἁγίοις πίστει . +verse_001_004 Παρεισέδυσαν γάρ τινες ἄνθρωποι , οἱ πάλαι προγεγραμμένοι εἰς τοῦτο τὸ κρίμα , ἀσεβεῖς , τὴν τοῦ Θεοῦ ἡμῶν χάριν μετατιθέντες εἰς ἀσέλγειαν , καὶ τὸν μόνον δεσπότην Θεὸν καὶ Κύριον ἡμῶν Ἰησοῦν Χριστὸν ἀρνούμενοι . ss +verse_001_005 Ὑπομνῆσαι δὲ ὑμᾶς βούλομαι , εἰδότας ὑμᾶς ἅπαξ τοῦτο , ὅτι ὁ Κύριος , λαὸν ἐκ γῆς Αἰγύπτου σώσας , τὸ δεύτερον τοὺς μὴ πιστεύσαντας ἀπώλεσεν . +verse_001_006 Ἀγγέλους τε τοὺς μὴ τηρήσαντας τὴν ἑαυτῶν ἀρχήν , ἀλλὰ ἀπολιπόντας τὸ ἴδιον οἰκητήριον , εἰς κρίσιν μεγάλης ἡμέρας δεσμοῖς ἀϊδίοις ὑπὸ ζόφον τετήρηκεν . ss +verse_001_007 Ὡς Σόδομα καὶ Γόμορρα , καὶ αἱ περὶ αὐτὰς πόλεις , τὸν ὅμοιον τούτοις τρόπον ἐκπορνεύσασαι , καὶ ἀπελθοῦσαι ὀπίσω σαρκὸς ἑτέρας , πρόκεινται δεῖγμα , πυρὸς αἰωνίου δίκην ὑπέχουσαι . ss +verse_001_008 Ὁμοίως μέντοι καὶ οὗτοι ἐνυπνιαζόμενοι σάρκα μὲν μιαίνουσι , κυριότητα δὲ ἀθετοῦσι , δόξας δὲ βλασφημοῦσιν . ss +verse_001_009 Ὁ δὲ Μιχαὴλ ὁ ἀρχάγγελος , ὅτε τῷ διαβόλῳ διακρινόμενος διελέγετο περὶ τοῦ Μωσέως σώματος , οὐκ ἐτόλμησε κρίσιν ἐπενεγκεῖν βλασφημίας , ἀλλ ᾿ εἶπεν , Ἐπιτιμήσαι σοι Κύριος . ss +verse_001_010 Οὗτοι δὲ ὅσα μὲν οὐκ οἴδασι βλασφημοῦσιν · ὅσα δὲ φυσικῶς , ὡς τὰ ἄλογα ζῷα , ἐπίστανται , ἐν τούτοις φθείρονται . ss +verse_001_011 Οὐαὶ αὐτοῖς · ὅτι τῇ ὁδῷ τοῦ Κάϊν ἐπορεύθησαν , καὶ τῇ πλάνῃ τοῦ Βαλαὰμ μισθοῦ ἐξεχύθησαν , καὶ τῇ ἀντιλογίᾳ τοῦ Κόρε ἀπώλοντο . ss +verse_001_012 Οὗτοί εἰσιν ἐν ταῖς ἀγάπαις ὑμῶν σπιλάδες , συνευωχούμενοι , ἀφόβως ἑαυτοὺς ποιμαίνοντες · νεφέλαι ἄνυδροι , ὑπὸ ἀνέμων περιφερόμεναι · δένδρα φθινοπωρινά , ἄκαρπα , δὶς ἀποθανόντα , ἐκριζωθέντα · ss +verse_001_013 κύματα ἄγρια θαλάσσης , ἐπαφρίζοντα τὰς ἑαυτῶν αἰσχύνας · ἀστέρες πλανῆται , οἷς ὁ ζόφος τοῦ σκότους εἰς τὸν αἰῶνα τετήρηται . +verse_001_014 Προεφήτευσε δὲ καὶ τούτοις ἕβδομος ἀπὸ Ἀδὰμ Ἐνώχ , λέγων , Ἰδού , ἦλθε Κύριος ἐν μυριάσιν ἁγίαις αὐτοῦ , ss +verse_001_015 ποιῆσαι κρίσιν κατὰ πάντων , καὶ ἐξελέγξαι πάντας τοὺς ἀσεβεῖς αὐτῶν περὶ πάντων τῶν ἔργων ἀσεβείας αὐτῶν ὧν ἠσέβησαν , καὶ περὶ πάντων τῶν σκληρῶν ὧν ἐλάλησαν κατ ᾿ αὐτοῦ ἁμαρτωλοὶ ἀσεβεῖς . +verse_001_016 Οὗτοί εἰσι γογγυσταί , μεμψίμοιροι , κατὰ τὰς ἐπιθυμίας αὐτῶν πορευόμενοι , καὶ τὸ στόμα αὐτῶν λαλεῖ ὑπέρογκα , θαυμάζοντες πρόσωπα ὠφελείας χάριν . ss +verse_001_017 Ὑμεῖς δέ , ἀγαπητοί , μνήσθητε τῶν ῥημάτων τῶν προειρημένων ὑπὸ τῶν ἀποστόλων τοῦ Κυρίου ἡμῶν Ἰησοῦ Χριστοῦ · +verse_001_018 ὅτι ἔλεγον ὑμῖν ὅτι ἐν ἐσχάτῳ χρόνῳ ἔσονται ἐμπαῖκται , κατὰ τὰς ἑαυτῶν ἐπιθυμίας πορευόμενοι τῶν ἀσεβειῶν . +verse_001_019 Οὗτοί εἰσιν οἱ ἀποδιορίζοντες , ψυχικοί , πνεῦμα μὴ ἔχοντες . ss +verse_001_020 Ὑμεῖς δέ , ἀγαπητοί , τῇ ἁγιωτάτῃ ὑμῶν πίστει ἐποικοδομοῦντες ἑαυτούς , ἐν πνεύματι ἁγίῳ προσευχόμενοι , ss +verse_001_021 ἑαυτοὺς ἐν ἀγάπῃ Θεοῦ τηρήσατε , προσδεχόμενοι τὸ ἔλεος τοῦ Κυρίου ἡμῶν Ἰησοῦ Χριστοῦ εἰς ζωὴν αἰώνιον . +verse_001_022 Καὶ οὓς μὲν ἐλεεῖτε διακρινόμενοι · ss +verse_001_023 οὓς δὲ ἐν φόβῳ σώζετε , ἐκ τοῦ πυρὸς ἁρπάζοντες , μισοῦντες καὶ τὸν ἀπὸ τῆς σαρκὸς ἐσπιλωμένον χιτῶνα . +verse_001_024 Τῷ δὲ δυναμένῳ φυλάξαι αὐτοὺς ἀπταίστους , καὶ στῆσαι κατενώπιον τῆς δόξης αὐτοῦ ἀμώμους ἐν ἀγαλλιάσει , +verse_001_025 μόνῳ σοφῷ Θεῷ σωτῆρι ἡμῶν , δόξα καὶ μεγαλωσύνη , κράτος καὶ ἐξουσία , καὶ νῦν καὶ εἰς πάντας τοὺς αἰῶνας . Ἀμήν . \ No newline at end of file diff --git a/scripts/load_testing_data/testsrc2.txt b/scripts/load_testing_data/testsrc2.txt new file mode 100644 index 00000000..7c19abe9 --- /dev/null +++ b/scripts/load_testing_data/testsrc2.txt @@ -0,0 +1,32 @@ +h_001 ΚΑΤΑ ΜΑΤΘΑΙΟΝ ss +mt1_001 ΕΥΑΓΓΕΛΙΟΝ +mt1_002 ΤΟ ΚΑΤΑ ΜΑΤΘΑΙΟΝ +toc1_001 ΕΥΑΓΓΕΛΙΟΝ ΤΟ ΚΑΤΑ ΜΑΤΘΑΙΟΝ +toc2_001 ΚΑΤΑ ΜΑΤΘΑΙΟΝ +toc3_001 ΚΑΤΑ ΜΑΤΘΑΙΟΝ +verse_001_001 Βίβλος γενέσεως Ἰησοῦ Χριστοῦ , υἱοῦ Δαβίδ , υἱοῦ Ἀβραάμ . +verse_001_002 Ἀβραὰμ ἐγέννησε τὸν Ἰσαάκ · Ἰσαὰκ δὲ ἐγέννησε τὸν Ἰακώβ · Ἰακὼβ δὲ ἐγέννησε τὸν Ἰούδαν καὶ τοὺς ἀδελφοὺς αὐτοῦ · +verse_001_003 Ἰούδας δὲ ἐγέννησε τὸν Φαρὲς καὶ τὸν Ζαρὰ ἐκ τῆς Θάμαρ · Φαρὲς δὲ ἐγέννησε τὸν Ἑσρώμ · Ἑσρὼμ δὲ ἐγέννησε τὸν Ἀράμ · +verse_001_004 Ἀρὰμ δὲ ἐγέννησε τὸν Ἀμιναδάβ · Ἀμιναδὰβ δὲ ἐγέννησε τὸν Ναασσών · Ναασσὼν δὲ ἐγέννησε τὸν Σαλμών · +verse_001_005 Σαλμὼν δὲ ἐγέννησε τὸν Βοὸζ ἐκ τῆς Ῥαχάβ · Βοὸζ δὲ ἐγέννησε τὸν Ὠβὴδ ἐκ τῆς Ῥούθ · Ὠβὴδ δὲ ἐγέννησε τὸν Ἰεσσαί · +verse_001_006 Ἰεσσαὶ δὲ ἐγέννησε τὸν Δαβὶδ τὸν βασιλέα . +verse_001_006_001 Δαβὶδ δὲ ὁ βασιλεὺς ἐγέννησε τὸν Σολομῶντα ἐκ τῆς τοῦ Οὐρίου · ss +verse_001_007 Σολομὼν δὲ ἐγέννησε τὸν Ῥοβοάμ · Ῥοβοὰμ δὲ ἐγέννησε τὸν Ἀβιά · Ἀβιὰ δὲ ἐγέννησε τὸν Ἀσά · +verse_001_008 Ἀσὰ δὲ ἐγέννησε τὸν Ἰωσαφάτ · Ἰωσαφὰτ δὲ ἐγέννησε τὸν Ἰωράμ · Ἰωρὰμ δὲ ἐγέννησε τὸν Ὀζίαν · +verse_001_009 Ὀζίας δὲ ἐγέννησε τὸν Ἰωάθαμ · Ἰωάθαμ δὲ ἐγέννησε τὸν Ἄχαζ · Ἄχαζ δὲ ἐγέννησε τὸν Ἑζεκίαν · +verse_001_010 Ἑζεκίας δὲ ἐγέννησε τὸν Μανασσῆ · Μανασσῆς δὲ ἐγέννησε τὸν Ἀμών · Ἀμὼν δὲ ἐγέννησε τὸν Ἰωσίαν · +verse_001_011 Ἰωσίας δὲ ἐγέννησε τὸν Ἰεχονίαν καὶ τοὺς ἀδελφοὺς αὐτοῦ , ἐπὶ τῆς μετοικεσίας Βαβυλῶνος . +verse_001_012 Μετὰ δὲ τὴν μετοικεσίαν Βαβυλῶνος , Ἰεχονίας ἐγέννησε τὸν Σαλαθιήλ · Σαλαθιὴλ δὲ ἐγέννησε τὸν Ζοροβάβελ · +verse_001_013 Ζοροβάβελ δὲ ἐγέννησε τὸν Ἀβιούδ · Ἀβιοὺδ δὲ ἐγέννησε τὸν Ἐλιακείμ · Ἐλιακεὶμ δὲ ἐγέννησε τὸν Ἀζώρ · +verse_001_014 Ἀζὼρ δὲ ἐγέννησε τὸν Σαδώκ · Σαδὼκ δὲ ἐγέννησε τὸν Ἀχείμ · Ἀχεὶμ δὲ ἐγέννησε τὸν Ἐλιούδ · +verse_001_015 Ἐλιοὺδ δὲ ἐγέννησε τὸν Ἐλεάζαρ · Ἐλεάζαρ δὲ ἐγέννησε τὸν Ματθάν · Ματθὰν δὲ ἐγέννησε τὸν Ἰακώβ · +verse_001_016 Ἰακὼβ δὲ ἐγέννησε τὸν Ἰωσὴφ τὸν ἄνδρα Μαρίας , ἐξ ἧς ἐγεννήθη Ἰησοῦς , ὁ λεγόμενος Χριστός . +verse_001_017 Πᾶσαι οὖν αἱ γενεαὶ ἀπὸ Ἀβραὰμ ἕως Δαβὶδ γενεαὶ δεκατέσσαρες · καὶ ἀπὸ Δαβὶδ ἕως τῆς μετοικεσίας Βαβυλῶνος , γενεαὶ δεκατέσσαρες · καὶ ἀπὸ τῆς μετοικεσίας Βαβυλῶνος ἕως τοῦ Χριστοῦ , γενεαὶ δεκατέσσαρες . +verse_001_018 Τοῦ δὲ Ἰησοῦ Χριστοῦ ἡ γέννησις οὕτως ἦν . Μνηστευθείσης γὰρ τῆς μητρὸς αὐτοῦ Μαρίας τῷ Ἰωσήφ , πρὶν ἢ συνελθεῖν αὐτούς , εὑρέθη ἐν γαστρὶ ἔχουσα ἐκ πνεύματος ἁγίου . +verse_001_019 Ἰωσὴφ δὲ ὁ ἀνὴρ αὐτῆς , δίκαιος ὤν , καὶ μὴ θέλων αὐτὴν παραδειγματίσαι , ἐβουλήθη λάθρᾳ ἀπολῦσαι αὐτήν . ss +verse_001_020 Ταῦτα δὲ αὐτοῦ ἐνθυμηθέντος , ἰδού , ἄγγελος Κυρίου κατ ᾿ ὄναρ ἐφάνη αὐτῷ , λέγων , Ἰωσήφ , υἱὸς Δαβίδ , μὴ φοβηθῇς παραλαβεῖν Μαριὰμ τὴν γυναῖκά σου · τὸ γὰρ ἐν αὐτῇ γεννηθὲν ἐκ πνεύματός ἐστιν ἁγίου . ss +verse_001_021 Τέξεται δὲ υἱόν , καὶ καλέσεις τὸ ὄνομα αὐτοῦ Ἰησοῦν · αὐτὸς γὰρ σώσει τὸν λαὸν αὐτοῦ ἀπὸ τῶν ἁμαρτιῶν αὐτῶν . ss +verse_001_022 Τοῦτο δὲ ὅλον γέγονεν , ἵνα πληρωθῇ τὸ ῥηθὲν ὑπὸ τοῦ Κυρίου διὰ τοῦ προφήτου , λέγοντος , ss +verse_001_023 Ἰδού , ἡ παρθένος ἐν γαστρὶ ἕξει καὶ τέξεται υἱόν , καὶ καλέσουσι τὸ ὄνομα αὐτοῦ Ἐμμανουήλ , ὅ ἐστι μεθερμηνευόμενον , Μεθ ᾿ ἡμῶν ὁ Θεός . +verse_001_024 Διεγερθεὶς δὲ ὁ Ἰωσὴφ ἀπὸ τοῦ ὕπνου , ἐποίησεν ὡς προσέταξεν αὐτῷ ὁ ἄγγελος Κυρίου · καὶ παρέλαβε τὴν γυναῖκα αὐτοῦ , ss +verse_001_025 καὶ οὐκ ἐγίνωσκεν αὐτὴν ἕως οὗ ἔτεκε τὸν υἱὸν αὐτῆς τὸν πρωτότοκον · καὶ ἐκάλεσε τὸ ὄνομα αὐτοῦ Ἰησοῦν . \ No newline at end of file diff --git a/scripts/load_testing_data/testtarg.txt b/scripts/load_testing_data/testtarg.txt new file mode 100644 index 00000000..59e55a43 --- /dev/null +++ b/scripts/load_testing_data/testtarg.txt @@ -0,0 +1,43 @@ +mt1_001 Jude +mt2_001 The General Epistle of +p_001 +p_002 +p_003 +p_004 +p_005 +p_006 +rem_001 Jude Draft Translation ss +s_001 Greetings +s_002 The false teachers ss +s_003 Exhortations to remain steadfast and rebuke those in error ss +s_004 Benediction ss +verse_001_001 Jude , a slave of Jesus Christ , and brother of James . +verse_001_001_001 To those who are called , sanctified by God the Father , and preserved in Jesus Christ : +verse_001_001_002 +verse_001_002 +verse_001_003 Beloved , while I was making every effort to write to you concerning the common salvation , I found it necessary to write to you , exhorting you to struggle for the faith that was once for all delivered to the saints . +verse_001_004 For certain men have sneaked in , who long ago were written down for this judgment , ungodly men , who turn the grace of our God into sensuality and deny the only Lord God , and our Lord Jesus Christ . ss +verse_001_005 But I want to remind you , though you once knew this , that the Lord , having saved the people out of the land of Egypt , afterwards destroyed those who did not believe . +verse_001_006 And the angels who did not keep their domain , but abandoned their own dwelling , He has kept in eternal chains under darkness for the judgment of the great day . +verse_001_007 As Sodom and Gomorrah , and the cities around them , who in a similar way lived in sexual immorality and went after strange flesh , are set forth as an example , suffering the vengance of eternal fire . +verse_001_007_001 ss +verse_001_008 Nevertheless , in the same way these dreamers defile the flesh , reject authority , and blaspheme the glorious . +verse_001_009 But Michael the archangel , when disputing with the devil , arguing about the body of Moses , dared not give him a blasphemous judgment , but said , " The Lord rebuke you ! " ss +verse_001_010 But these blaspheme whatever they do not know , and whatever they know of the world , like irrational animals , in these things are corrupted . ss +verse_001_011 Woe to them ! For they have gone in the way of Cain , and run after the error of Balaam for reward , and perished in the rebellion of Korah . ss +verse_001_012 These are hidden reefs in your love feasts , feasting with you fearlessly , caring only for themselves . Waterless clouds , carried about by wind . Autumn trees , unfruitful , twice dead , uprooted ; +verse_001_013 wild sea waves , foaming up their own shame ; wandering stars for who the gloom of darkness is reserved forever . +verse_001_013_001 ss +verse_001_014 And also Enoch , the seventh from Adam , prophesised about these , saying , " Behold the Lord comes with ten thousands of His saints , +verse_001_015 to execute judgment on all , to convict all who are ungodly among them of all their ungodly works , their ungodly lives , and all of the cruelties these ungodly sinners have spoken against Him . " +verse_001_016 These are grumblers , complainers , going after their own lusts , and their mouth speaks boastfully , flattering people for the sake of advantage . +verse_001_017 But you , beloved , remember the words which were spoken before by the apostles of our Lord Jesus Christ , ss +verse_001_018 that they told you that : " In the last time there will be mockers , following after their own ungodly lusts . " +verse_001_019 +verse_001_020 But you , beloved , building yourselves up on your most holy faith , praying in the Holy Spirit , +verse_001_021 keep yourselves in the love of God , waiting for the mercy of our Lord Jesus Christ to eternal life . +verse_001_021_001 ss +verse_001_022 And for those who are doubting , have mercy ; +verse_001_023 +verse_001_024 Now unto him who is able to keep you from falling , and present you faultless before the presence of His glory with exceeding joy . ss +verse_001_025 To the only wise God our Saviour , be glory and majesty , dominion and power , both now and forever . Amen . \ No newline at end of file diff --git a/scripts/load_testing_data/testtarg2.txt b/scripts/load_testing_data/testtarg2.txt new file mode 100644 index 00000000..e46adf0d --- /dev/null +++ b/scripts/load_testing_data/testtarg2.txt @@ -0,0 +1,25 @@ +verse_001_001 ss +verse_001_002 +verse_001_003 +verse_001_004 +verse_001_005 +verse_001_006 +verse_001_007 +verse_001_008 +verse_001_009 +verse_001_010 +verse_001_011 +verse_001_012 +verse_001_013 +verse_001_014 +verse_001_015 +verse_001_016 +verse_001_017 +verse_001_018 +verse_001_019 +verse_001_020 +verse_001_021 +verse_001_022 +verse_001_023 +verse_001_024 +verse_001_025 \ No newline at end of file