elasticsearch - 如何在Elasticsearch中对执行进行基准测试?

标签 elasticsearch benchmarking

我要执行Benckmark测试,并遵循Elasticsearch documentation

/bin/elasticsearch --node.bench true

curl -XPUT 'localhost:9200/_bench/?pretty=true' -d '{
   "name": "my_benchmark",
   "competitors": [ {
       "name": "my_competitor",
       "requests": [ {
        "query": {
            "match": { "_all": "a*" }
                     }
              } ] 
         } ]
}'

但我得到了异常(exception)。
{   "error" : "InvalidIndexNameException[[_bench] Invalid index name
[_bench], must not start with '_']",   "status" : 400 }

我究竟做错了什么。

最佳答案

我检查了1.4.2版中新下载的elasticsearch,并得到了与您相同的结果。

然后,我从github的主分支中编译了 flex 搜索,并且该搜索有效。对于您的 curl ,我得到以下答复:

{
  "status" : "COMPLETE",
  "errors" : [ ],
  "competitors" : {
    "my_competitor" : {
      "summary" : {
        "nodes" : [
        "Cable" ],
        "total_iterations" : 5,
        "completed_iterations" : 5,
        "total_queries" : 5000,
        "concurrency" : 5,
        "multiplier" : 1000,
        "avg_warmup_time" : 0.0,
        "statistics" : {
          "min" : 1,
          "max" : 1,
          "mean" : 1.0,
          "qps" : 1000.0,
          "std_dev" : 0.0,
          "millis_per_hit" : 0.0,
          "percentile_10" : 1.0,
          "percentile_25" : 1.0,
          "percentile_50" : 1.0,
          "percentile_75" : 1.0,
          "percentile_90" : 1.0,
          "percentile_99" : 1.0
        }
      }
    }
  }
}

对于更简单的 curl ,我得到了:
curl -XGET 'localhost:9200/_bench?pretty'

{ }

因此,该功能似乎处于试验阶段,因此尚未包含在任何稳定版本中。

我想文档标题中的引用[master]不是巧合;)

关于elasticsearch - 如何在Elasticsearch中对执行进行基准测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27432527/

相关文章:

spring-boot - 使用Java将数据从AWS DynamoDB索引到Elasticssearch云

elasticsearch - Grafana与ElasticSearch:使用插件来操纵数据库

arrays - 如何在Elasticsearch数组列表中查询精确值(带空格)

apache - 如何使用延迟对 apache 进行基准测试?

c++ - 防止或阻止 cpu 数据缓存加载

java - Elasticsearch 嵌套排序

http - 如何查询elasticsearch获取两个时间戳之间的数据

c - 内存延迟曲线问题

c++ - 是否有 webAssembly 的标准基准?

c++ - 如何通过对代码进行基准测试来计算 std dev、quartile 等?