rally icon indicating copy to clipboard operation
rally copied to clipboard

Should we add a single-task interface?

Open danielmitterdorfer opened this issue 5 years ago • 0 comments

Sometimes a Rally track is too much hassle. A user might want to play around with an Elasticsearch API and benchmark a single API call. For this use-case we could offer a new command line parameter --task. I'll demonstrate the idea with a few examples:

# issue a single force-merge call, assuming that no parameters 
# are required for this operation:
#
# note: Some tasks don't show up in the command line report by default. 
#          Under the hood we might want to force reporting if only a single 
#          task is scheduled via this parameter
esrally --target-hosts="127.0.0.1:9200" --task="force-merge"

# run a query benchmark - we should support inline JSON 
# or loading this task from a JSON file (as we do with other parameters)
esrally --target-hosts="...." --task='
{
  "name": "match-all",
  "clients": 8,
  "warmup-iterations": 500,
  "iterations": 500,
  "target-throughput": 5,
  "schedule": "poisson",
  "operation": {
    "operation-type": "search",
    "body": {
      "query": {
        "match_all": {}
      }
    }
  }
}
'

danielmitterdorfer avatar Dec 18 '19 14:12 danielmitterdorfer