Orodruin data

This commit is contained in:
Evann Regnault 2024-06-01 15:28:13 +00:00
parent c6dc0a797b
commit 5477ab6025
4 changed files with 4 additions and 3 deletions

View file

@ -22,8 +22,8 @@ def test_psql():
def test_elasticsearch(shards = 1): def test_elasticsearch(shards = 1):
es = Elasticsearch( es = Elasticsearch(
'http://docker.tma.coe.int:9200', 'https://localhost:9200',
api_key='YVE1VDA0OEI3c28wRGJYTUZkLW46OWFYSUQtQVhUcGVvTmlKdUtmS29Wdw==', api_key='Z18xZzFJOEJXTnUzZ2RiTk5YWkw6ekhiRVpQYnVTZ2FhRjFCR3NVUFB4UQ==',
verify_certs=False, # just to not create certificates verify_certs=False, # just to not create certificates
ssl_show_warn=False ssl_show_warn=False
) )
@ -81,7 +81,7 @@ if __name__ == "__main__":
timings['PSQL'] = test_psql() timings['PSQL'] = test_psql()
timings['ES'] = test_elasticsearch() timings['ES'] = test_elasticsearch()
timings['ES2shards'] = test_elasticsearch(2) timings['ES2shards'] = test_elasticsearch(2)
timings['ES4shards'] = test_elasticsearch(4) #timings['ES4shards'] = test_elasticsearch(4)
plot(timings) plot(timings)
print(timings) print(timings)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View file

@ -26,6 +26,7 @@ def time_func(name: str, function_name: str, x : Callable, repeat : Optional[int
def preprocess_json(): def preprocess_json():
# Change for more or less values
for x in range(0, 10): for x in range(0, 10):
with open('data.json', 'r') as f: with open('data.json', 'r') as f:
data : dict = json.load(f) data : dict = json.load(f)