Closed leopck closed 2 years ago
This commit enables a new REST API endpoints which provides users capability to list all pipelines rather than querying each pipelines ID individually using RESTful endpoints. This also lists all pipelines status directly from GST States.
New RESTful API endpoint:
curl http://localhost:8080/pipelines/status_all
Sample output: Before prettify:
"[{\"id\": 1, \"state\": \"COMPLETED\", \"avg_fps\": 8.932587737800183, \"start_time\": 1638179813.2005367, \"elapsed_time\": 72.43142008781433, \"avg_pipeline_latency\": 0.4533823041311556}, {\"id\": 2, \"state\": \"ERROR\", \"avg_fps\": 0, \"start_time\": null, \"elapsed_time\": null}, {\"id\": 3, \"state\": \"RUNNING\", \"avg_fps\": 6.366260838099841, \"start_time\": 1638179886.3203313, \"elapsed_time\": 16.493194580078125, \"avg_pipeline_latency\": 0.6517487730298723}, {\"id\": 4, \"state\": \"RUNNING\", \"avg_fps\": 3.820389946226454, \"start_time\": 1638179896.0079544, \"elapsed_time\": 6.805586099624634, \"avg_pipeline_latency\": 1.0616143116584191}, {\"id\": 5, \"state\": \"QUEUED\", \"avg_fps\": 0.0, \"start_time\": 1638179899.0670815, \"elapsed_time\": 3.7464776039123535}]"
After prettify:
[ { "id": 1, "state": "COMPLETED", "avg_fps": 8.932587737800183, "start_time": 1638179813.2005367, "elapsed_time": 72.43142008781433, "avg_pipeline_latency": 0.4533823041311556 }, { "id": 2, "state": "ERROR", "avg_fps": 0, "start_time": null, "elapsed_time": null }, { "id": 3, "state": "RUNNING", "avg_fps": 6.366260838099841, "start_time": 1638179886.3203313, "elapsed_time": 16.493194580078125, "avg_pipeline_latency": 0.6517487730298723 }, { "id": 4, "state": "RUNNING", "avg_fps": 3.820389946226454, "start_time": 1638179896.0079544, "elapsed_time": 6.805586099624634, "avg_pipeline_latency": 1.0616143116584191 }, { "id": 5, "state": "QUEUED", "avg_fps": 0, "start_time": 1638179899.0670815, "elapsed_time": 3.7464776039123535 } ]
Signed-off-by: Stanley Phoong Cheong Kwan stanley.cheong.kwan.phoong@intel.com
Closed for internal review.
This commit enables a new REST API endpoints which provides users capability to list all pipelines rather than querying each pipelines ID individually using RESTful endpoints. This also lists all pipelines status directly from GST States.
New RESTful API endpoint:
Sample output: Before prettify:
After prettify:
Signed-off-by: Stanley Phoong Cheong Kwan stanley.cheong.kwan.phoong@intel.com