diff --git a/main.py b/main.py index dfac1d3..f4738aa 100644 --- a/main.py +++ b/main.py @@ -22,8 +22,8 @@ def test_psql(): def test_elasticsearch(shards = 1): es = Elasticsearch( - 'http://docker.tma.coe.int:9200', - api_key='YVE1VDA0OEI3c28wRGJYTUZkLW46OWFYSUQtQVhUcGVvTmlKdUtmS29Wdw==', + 'https://localhost:9200', + api_key='Z18xZzFJOEJXTnUzZ2RiTk5YWkw6ekhiRVpQYnVTZ2FhRjFCR3NVUFB4UQ==', verify_certs=False, # just to not create certificates ssl_show_warn=False ) @@ -81,7 +81,7 @@ if __name__ == "__main__": timings['PSQL'] = test_psql() timings['ES'] = test_elasticsearch() timings['ES2shards'] = test_elasticsearch(2) - timings['ES4shards'] = test_elasticsearch(4) + #timings['ES4shards'] = test_elasticsearch(4) plot(timings) print(timings) diff --git a/plot-orodruin-opti.png b/plot-orodruin-opti.png index 5324314..b0f4d41 100644 Binary files a/plot-orodruin-opti.png and b/plot-orodruin-opti.png differ diff --git a/plot-tma-opti.png b/plot-tma-opti.png index f877bf3..5324314 100644 Binary files a/plot-tma-opti.png and b/plot-tma-opti.png differ diff --git a/utils/utils.py b/utils/utils.py index 394fa61..4ba8d63 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -26,6 +26,7 @@ def time_func(name: str, function_name: str, x : Callable, repeat : Optional[int def preprocess_json(): + # Change for more or less values for x in range(0, 10): with open('data.json', 'r') as f: data : dict = json.load(f)