How to config esrally metric store so that "meta" of rally-metrics-* can record "took" of each query

I use metric store to save esrally results. Some of my results, the "meta" includes "took" of each query:

"meta": {
           "plugins": [
             "test_plugin"
           ],
           "attribute_xpack.installed": "true",
           "source_revision": "053779d",
           "distribution_version": "6.3.2",
           "distribution_flavor": "default",
           "index": "index_test",
           "took": 129,
           "success": true,
           "success-count": 50,
           "error-count": 0
},

However, some results are not, like this:

"meta" : {
            "plugins" : [
              "PLUGIN_TEST"
            ],
            "attribute_ml.machine_memory" : "33651015680",
            "attribute_xpack.installed" : "true",
            "attribute_ml.max_open_jobs" : "20",
            "attribute_ml.enabled" : "true",
            "source_revision" : "8453f77",
            "distribution_version" : "6.7.0",
            "distribution_flavor" : "default",
            "success" : true
          },

Which setting that I can configure for "took" ?


#Update 1
Seems only "took" of bulk operation can be recorded.
Is that possible to save "took" of query operation in metric store?
Thanks!

Hi @kingswan, for search operations, have a look at setting detailed-results to true to return took time in meta-data.

https://esrally.readthedocs.io/en/stable/track.html#id8

Hi Jason,
Thanks for your help!
I changed my search operation with detailed-results in this way:

{
      "name": "randomized-nested-queries",
      "operation-type": "search",
      "detailed-results": true,
      "param-source": "nested-query-source"
}

here is my challenge:

{
    "name": "queries-tp002",
    "description": "vector-plugin-p15w-nested-queries-tp2",
    "default": false,
    "schedule": [
      {
          "operation": "randomized-nested-queries",
          "clients": 2,
          "target-throughput": 2,
          "warmup-iterations": 5,
          "iterations": 10
      }
    ]
},

here is my track.json:

  "operations": [
    {{ rally.collect(parts="operations/*.json") }}
  ],
  "challenges": [
    {{ rally.collect(parts="challenges/*.json") }}
  ]

and this is the way I start a rally:

esrally race --track-path=track.json --challenge=queries-tp002 --target-hosts=remoteIP:9201 --pipeline=benchmark-only

However, my meta-data still not contains took:

"meta" : {
            "plugins" : [
              "GWSSI-KNN-PLUGIN"
            ],
            "attribute_ml.machine_memory" : "33651015680",
            "attribute_xpack.installed" : "true",
            "attribute_ml.max_open_jobs" : "20",
            "attribute_ml.enabled" : "true",
            "source_revision" : "8453f77",
            "distribution_version" : "6.7.0",
            "distribution_flavor" : "default",
            "success" : true
          },

is that relate to my plugin or maybe the cache?
p.s. I use rally 2.3.0, my cluster version is es6.7.0, my metric store version is es7.4.0
Best,
Chester

I can reproduce the issue: while detailed-results works with normal searches, it does not have any effect with custom parameter sources. I opened Custom parameter sources do not honor detailed-results · Issue #1390 · elastic/rally · GitHub to track this.

Hi Quentin, thanks for the feedback. Hope it can be fixed soon.

@kingswan Can you please try setting detailed-results to True in your customer parameter source code in track.py? I confirmed that works.

Yes, it works! Really appreciate for your help.

And I'm thankful for the help of @danielmitterdorfer who told me the solution in that GitHub issue. :slight_smile:

Glad we could help!