指标
工作负载完成后,OpenSearch Benchmark 会将其所有指标记录存储在其指标存储中。这些指标可以保存在内存中或 OpenSearch 集群中。
存储指标
您可以通过在 benchmark.ini
文件中设置 datastore.type
参数,来指定在运行基准测试时指标是存储在内存中还是指标存储中。
在内存中
如果您想在运行基准测试时将指标存储在内存中,请在 benchmark.ini
的 results_publishing
部分提供以下设置:
[results_publishing]
datastore.type = in-memory
datastore.host = <host-url>
datastore.port = <host-port>
datastore.secure = False
datastore.ssl.verification_mode = <ssl-verification-details>
datastore.user = <username>
datastore.password = <password>
OpenSearch
如果您想在运行基准测试时将指标存储在外部 OpenSearch 集群中,请在 benchmark.ini
的 results_publishing
部分提供以下设置:
[results_publishing]
datastore.type = opensearch
datastore.host = <opensearch endpoint>
datastore.port = 443
datastore.secure = true
datastore.ssl.verification_mode = none
datastore.user = <opensearch basic auth username>
datastore.password = <opensearch basic auth password>
datastore.number_of_replicas =
datastore.number_of_shards =
当未提供 datastore.number_of_replicas
和 datastore.number_of_shards
时,OpenSearch 会使用默认值:副本数为 0
,分片数为 1
。如果在数据存储集群创建后更改这些设置,新的副本和分片设置只会在月底创建新的结果索引时生效。
在您运行配置为使用 OpenSearch 作为数据存储的 OpenSearch Benchmark 后,OpenSearch Benchmark 会创建三个索引:
benchmark-metrics-YYYY-MM
:保存精细的指标和遥测数据。benchmark-results-YYYY-MM
:保存基于最终结果的数据。benchmark-test-executions-YYYY-MM
:保存有关execution-ids
的数据。
您可以在 OpenSearch Dashboards 中可视化这些索引内的数据。