Separate benchmark API endpoints

Separates benchmark API endpoints into separate files according to API
funtionality. This makes it easier for our tests and clients.

Closes #5787
This commit is contained in:
Andrew Selden 2014-04-14 17:36:43 -07:00
parent 3d23a71fa7
commit 7ef36d9d52
3 changed files with 50 additions and 8 deletions

View File

@ -0,0 +1,20 @@
{
"benchmark.abort" : {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html",
"methods": ["POST"],
"url": {
"path": "/_bench/abort/{name}",
"paths": [
"/_bench/abort/{name}"
],
"parts": {
"name": {
"type" : "string",
"description" : "A benchmark name"
}
},
"params": {}
},
"body": null
}
}

View File

@ -0,0 +1,27 @@
{
"benchmark.list" : {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html",
"methods": ["GET"],
"url": {
"path": "/_bench",
"paths": [
"/_bench",
"/{index}/_bench",
"/{index}/{type}/_bench"
],
"parts": {
"index": {
"type" : "list",
"description" : "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
},
"type": {
"type" : "string",
"required" : true,
"description" : "The name of the document type"
}
},
"params": {}
},
"body": null
}
}

View File

@ -1,14 +1,13 @@
{
"bench" : {
"benchmark.submit" : {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-benchmark.html",
"methods": ["GET", "PUT", "POST"],
"methods": ["PUT"],
"url": {
"path": "/_bench",
"paths": [
"/_bench",
"/{index}/_bench",
"/{index}/{type}/_bench",
"/_bench/abort/{name}"
"/{index}/{type}/_bench"
],
"parts": {
"index": {
@ -22,10 +21,6 @@
}
},
"params": {
"wait_for_completion": {
"type": "boolean",
"description": "Specify whether the caller will wait for the benchmark to complete or return immediately after submission (default: true)"
},
"verbose": {
"type": "boolean",
"description": "Specify whether to return verbose statistics about each iteration (default: false)"