Skip to content

Commit

Permalink
Change metrics store type from elasticsearch to opensearch (#74)
Browse files Browse the repository at this point in the history
Signed-off-by: Travis Benedict <[email protected]>
  • Loading branch information
travisbenedict authored Nov 17, 2021
1 parent f426868 commit eb685a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions osbenchmark/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def metrics_store(cfg, read_only=True, workload=None, test_procedure=None, provi


def metrics_store_class(cfg):
if cfg.opts("results_publishing", "datastore.type") == "elasticsearch":
if cfg.opts("results_publishing", "datastore.type") == "opensearch":
return OsMetricsStore
else:
return InMemoryMetricsStore
Expand Down Expand Up @@ -1004,7 +1004,7 @@ def to_externalizable(self, clear=False):
return None

def __str__(self):
return "Elasticsearch metrics store"
return "OpenSearch metrics store"


class InMemoryMetricsStore(MetricsStore):
Expand Down Expand Up @@ -1138,7 +1138,7 @@ def test_execution_store(cfg):
:return: A test_execution store implementation.
"""
logger = logging.getLogger(__name__)
if cfg.opts("results_publishing", "datastore.type") == "elasticsearch":
if cfg.opts("results_publishing", "datastore.type") == "opensearch":
logger.info("Creating OS test execution store")
return CompositeTestExecutionStore(EsTestExecutionStore(cfg), FileTestExecutionStore(cfg))
else:
Expand All @@ -1153,7 +1153,7 @@ def results_store(cfg):
:return: A test_execution store implementation.
"""
logger = logging.getLogger(__name__)
if cfg.opts("results_publishing", "datastore.type") == "elasticsearch":
if cfg.opts("results_publishing", "datastore.type") == "opensearch":
logger.info("Creating OS results store")
return OsResultsStore(cfg)
else:
Expand All @@ -1164,7 +1164,7 @@ def results_store(cfg):
def list_test_executions(cfg):
def format_dict(d):
if d:
items=sorted(d.items())
items = sorted(d.items())
return ", ".join(["%s=%s" % (k, v) for k, v in items])
else:
return None
Expand Down

0 comments on commit eb685a4

Please sign in to comment.