genome / ptero-workflow

Client-facing API for the PTero system
1 stars 6 forks source link

Add workflow-summary report #238

Closed davidlmorton closed 8 years ago

davidlmorton commented 8 years ago

This 'at-a-glance' report essentially shows the workflow-skeleton with an execution summary for tasks and methods. Below is an example on a workflow (while running) that is parallel and nested with parallel size 30 x 30.

$ time curl http://localhost:7000/v1/reports/workflow-summary?workflow_id=1
{
    "name": "8c953266-be55-4408-9c31-1b5a70902578",
    "status": "running",
    "tasks": {
        "DAG Task": {
            "executionSummary": {
                "running": 16,
                "succeeded": 15
            },
            "methods": [
                {
                    "executionSummary": {
                        "running": 15,
                        "succeeded": 15
                    },
                    "name": "Inner DAG",
                    "parameters": {
                        "tasks": {
                            "Job Task": {
                                "executionSummary": {
                                    "running": 464,
                                    "succeeded": 466
                                },
                                "methods": [
                                    {
                                        "executionSummary": {
                                            "running": 2,
                                            "scheduled": 446,
                                            "succeeded": 452
                                        },
                                        "name": "Echo",
                                        "service": "job"
                                    }
                                ],
                                "name": "Job Task",
                                "parallelBy": "job_in",
                                "topologicalIndex": 0
                            }
                        }
                    },
                    "service": "workflow"
                }
            ],
            "name": "DAG Task",
            "parallelBy": "dag_in",
            "topologicalIndex": 0
        }
    }
}

real    0m0.389s
user    0m0.000s
sys     0m0.007s
mkiwala commented 8 years ago

+1 :koala: Good work!