Skip to content

Commit

Permalink
Merge pull request #15 from MZC-CSC/feature_20241111_update-fetching-…
Browse files Browse the repository at this point in the history
…result

update performance evaluation apis
  • Loading branch information
hippo-an authored Nov 14, 2024
2 parents 8d1600e + b32ffc0 commit 5a1928c
Show file tree
Hide file tree
Showing 33 changed files with 1,147 additions and 345 deletions.
164 changes: 164 additions & 0 deletions api/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 164 additions & 0 deletions api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,86 @@
}
}
},
"/api/v1/load/tests/result/last": {
"get": {
"description": "Retrieve last load test result based on provided parameters.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Load Test Result]"
],
"summary": "Get last load test result by ns, mci, vm",
"operationId": "GetLastLoadTestResult",
"parameters": [
{
"type": "string",
"description": "ns id",
"name": "nsId",
"in": "query",
"required": true
},
{
"type": "string",
"description": "mci id",
"name": "mciId",
"in": "query",
"required": true
},
{
"type": "string",
"description": "vm id",
"name": "vmId",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Result format (normal or aggregate)",
"name": "format",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successfully retrieved load test metrics",
"schema": {
"allOf": [
{
"$ref": "#/definitions/app.JsonResult"
},
{
"type": "object",
"properties": {
"[aggregate]": {
"$ref": "#/definitions/app.AntResponse-array_load_LoadTestStatistics"
},
"[normal]": {
"$ref": "#/definitions/app.AntResponse-array_load_ResultSummary"
}
}
}
]
}
},
"400": {
"description": "Invalid request parameters",
"schema": {
"$ref": "#/definitions/app.AntResponse-string"
}
},
"500": {
"description": "Failed to retrieve load test result",
"schema": {
"$ref": "#/definitions/app.AntResponse-string"
}
}
}
}
},
"/api/v1/load/tests/result/metrics": {
"get": {
"description": "Retrieve load test metrics based on provided parameters.",
Expand Down Expand Up @@ -877,6 +957,71 @@
}
}
},
"/api/v1/load/tests/result/metrics/last": {
"get": {
"description": "Retrieve last load test metrics based on provided parameters.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"[Load Test Result]"
],
"summary": "Get last load test metrics by ns, mci, vm",
"operationId": "GetLastLoadTestMetrics",
"parameters": [
{
"type": "string",
"description": "ns id",
"name": "nsId",
"in": "query",
"required": true
},
{
"type": "string",
"description": "mci id",
"name": "mciId",
"in": "query",
"required": true
},
{
"type": "string",
"description": "vm id",
"name": "vmId",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Result format (normal for the moment)",
"name": "format",
"in": "query"
}
],
"responses": {
"200": {
"description": "Successfully retrieved load test metrics",
"schema": {
"$ref": "#/definitions/app.AntResponse-array_load_MetricsSummary"
}
},
"400": {
"description": "Invalid request parameters",
"schema": {
"$ref": "#/definitions/app.AntResponse-string"
}
},
"500": {
"description": "Failed to retrieve load test metrics",
"schema": {
"$ref": "#/definitions/app.AntResponse-string"
}
}
}
}
},
"/api/v1/load/tests/run": {
"post": {
"description": "Start a load test using the provided load test configuration.",
Expand Down Expand Up @@ -1732,6 +1877,19 @@
"TestFailed"
]
},
"constant.IconCode": {
"type": "string",
"enum": [
"IC0001",
"IC0002",
"IC0003"
],
"x-enum-varnames": [
"Ok",
"Fail",
"Pending"
]
},
"constant.InstallLocation": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -2250,12 +2408,18 @@
"executionStatus": {
"$ref": "#/definitions/constant.ExecutionStatus"
},
"expectedFinishAt": {
"type": "string"
},
"failureMessage": {
"type": "string"
},
"finishAt": {
"type": "string"
},
"iconCode": {
"$ref": "#/definitions/constant.IconCode"
},
"id": {
"type": "integer"
},
Expand Down
Loading

0 comments on commit 5a1928c

Please sign in to comment.