{"id":15823302,"url":"https://gitlab.com/arvidnl/vizpl2","last_synced_at":"2025-05-12T20:42:32.291Z","repository":{"id":58779577,"uuid":"31271635","full_name":"arvidnl/vizpl2","owner":"arvidnl","description":"Visualizes GitLab CI pipeline execution times.","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":null,"default_branch":"master","last_synced_at":"2025-05-06T19:18:27.955Z","etag":null,"topics":["gitlab","gitlab-ci","typescript"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":null,"metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-12T14:04:14.796Z","updated_at":"2024-09-11T09:01:42.576Z","dependencies_parsed_at":"2022-09-08T12:32:13.032Z","dependency_job_id":null,"html_url":"https://gitlab.com/arvidnl/vizpl2","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/arvidnl%2Fvizpl2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/arvidnl%2Fvizpl2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/arvidnl%2Fvizpl2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/arvidnl%2Fvizpl2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/arvidnl","download_url":"https://gitlab.com/arvidnl/vizpl2/-/archive/master/vizpl2-master.zip","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4518952,"owners_count":6979,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["gitlab","gitlab-ci","typescript"],"created_at":"2024-10-05T08:08:08.598Z","updated_at":"2025-05-12T20:42:32.245Z","avatar_url":null,"language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# vizpl2\n\nVisualizes GitLab CI pipeline execution times.\n\n![](https://gitlab.com/arvidnl/vizpl2/-/raw/master/.images/demo.gif)\n\n## Installation\n\n`vizpl2` can either be installed locally using `npm` or run through Docker.\n\n### Installation with `npm`\n\n```sh\nnpm install --global vizpl2\n```\n\nThis will put `vizpl2` in your path:\n\n\n```sh\n$ vizpl2 --graph 'arvidnl/vizpl2#725494153'\n...\n$ vizpl2 --help\n```\n\n### Usage with Docker\n\nDocker images for the vizpl2 `master` branch are pushed to\n`registry.gitlab.com/arvidnl/vizpl2:master`.\n\nFor ease of use, consider the following alias:\n\n```sh\nalias vizpl2=\"docker run --rm --tty registry.gitlab.com/arvidnl/vizpl2:master\"\n```\n\nThe `--tty` flag ensures that vizpl2's `--graph` mode displays ANSI\ncolors correctly.\n\n## Usage\n\nPipelines are referred to either as:\n\n - A pipeline reference `namespace/project#pipeline_id`, `project#pipeline_id`,\n   `#pipeline_id` or `pipeline_id`. At the time of writing `namespace`\n   defaults to `arvidnl` and `project` default to `vizpl2`. So\n   `arvidnl/vizpl2#725494153`, `vizpl2#725494153`, `'#725494153'` and\n   `725494153` all refer to the same pipeline. Be sure to quote\n   references given without namespace and project\n   (i.e. `'#725494153'`), to avoid the hash being interpreted as a\n   shell comment.\n - A pipeline URL,\n   i.e. `https://gitlab.com/namespace/project/-/pipelines/pipeline_id`,\n   which is equivalent to the pipeline reference\n   `namespace/project#pipeline_id`.\n - `local_file.json`, where `local_file.json` contain JSON data in the\n   output format of GitLab's [List pipeline jobs API\n   endpoint](https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-jobs).\n\n## Graphs\n\nSingle pipelines can be visualized as a graph by passing `--graph`:\n\n```sh\n$ vizpl2 --graph '#725494153'\nDataset    Job                      Time (█ = 5s, █ = time queued)\n---------- ------------------------ ------------------------------\n#725494153 [pipeline]               ▏█████████████████████████████   (NaN, 2m25s)\n#725494153 \u003e [install]              ▏ █████▋   (0s, 28s)\n#725494153   - install              ▏ █████▋   (0s, 28s)\n#725494153 \u003e [build]                ▏      ████████▋   (0s, 43s)\n#725494153   - docker:build_publish ▏      ███████████████▌   (0s, 1m17s)\n#725494153   - build                ▏      ██████▎   (0s, 31s)\n#725494153   - format               ▏      ████▎   (0s, 21s)\n#725494153 \u003e [test]                 ▏                      ███████▋   (0s, 38s)\n#725494153   - test                 ▏                      ███████▋   (0s, 38s)\n```\n\n## Tables\n\nThe duration of one or multiple pipelines can be presented as a table by passing `--table`:\n\n```sh\n$ npx vizpl2 --table '#725494153'\n+--------------------------------------------------------------+\n|                        Job durations                         |\n+--------------------------+-----------------------------------+\n|           Job            | #725494153 (n=1): Duration (mean) |\n+--------------------------+-----------------------------------+\n| [pipeline]               |                          2m25.17s |\n| \u003e [install]              |                            28.15s |\n|   - install              |                            28.15s |\n| \u003e [build]                |                            43.43s |\n|   - docker:build_publish |                          1m17.76s |\n|   - build                |                            31.06s |\n|   - format               |                            21.47s |\n| \u003e [test]                 |                            38.26s |\n|   - test                 |                            38.26s |\n|                          |                                   |\n| Sequential time (mean):  |                          3m16.69s |\n+--------------------------+-----------------------------------+\n```\n\nThe final row, labeled `Sequential time (mean)`, is the sum of the\nduration of each job in the pipeline.\n\n### Tables with multiple data sets\n\nYou can provide multiple pipeline references on the command line:\n\n```sh\n$ npx vizpl2 --table '#725494153' '#725491719'\n+--------------------------------------------------------------------------------------------------+\n|                                          Job durations                                           |\n+--------------------------+-----------------------------------+-----------------------------------+\n|           Job            | #725494153 (n=1): Duration (mean) | #725491719 (n=1): Duration (mean) |\n+--------------------------+-----------------------------------+-----------------------------------+\n| [pipeline]               |                          2m25.17s |                2m21.19s (- %2.82) |\n| \u003e [install]              |                            28.15s |                  29.62s (+ %5.23) |\n|   - install              |                            28.15s |                  29.62s (+ %5.23) |\n| \u003e [build]                |                            43.43s |                   41.9s (- %3.64) |\n|   - docker:build_publish |                          1m17.76s |                1m11.64s (- %8.54) |\n|   - build                |                            31.06s |                  32.26s (+ %3.88) |\n|   - format               |                            21.47s |                  21.81s (+ %1.57) |\n| \u003e [test]                 |                            38.26s |                  38.78s (+ %1.37) |\n|   - test                 |                            38.26s |                  38.78s (+ %1.37) |\n|                          |                                   |                                   |\n| Sequential time (mean):  |                          3m16.69s |                3m14.11s (- %1.33) |\n+--------------------------+-----------------------------------+-----------------------------------+\n```\n\n### Combining pipelines into data sets\n\nYou can average sets of pipelines by combining them into\ndata sets. Pipeline references are combined into a labeled data set by\nterminating them with a `--label \u003clabel-without-spaces\u003e` option:\n\n```sh\n$ vizpl2 --table \\\n    '#725494153' '#725491719' --label 'Dataset1' \\\n    '#725488623' '#725487593' --label 'Dataset2'\n+----------------------------------------------------------------------------------------------+\n|                                        Job durations                                         |\n+--------------------------+---------------------------------+---------------------------------+\n|           Job            | Dataset1 (n=2): Duration (mean) | Dataset2 (n=2): Duration (mean) |\n+--------------------------+---------------------------------+---------------------------------+\n| [pipeline]               |                        2m23.18s |              2m20.09s (- %2.21) |\n| \u003e [install]              |                          28.88s |                 28.46s (- %1.5) |\n|   - install              |                          28.88s |                 28.46s (- %1.5) |\n| \u003e [build]                |                          42.67s |                43.64s (+ %2.27) |\n|   - docker:build_publish |                         1m14.7s |              1m17.69s (+ %4.01) |\n|   - build                |                          31.66s |                30.51s (- %3.77) |\n|   - format               |                          21.64s |                22.71s (+ %4.95) |\n| \u003e [test]                 |                          38.52s |               32.88s (- %17.15) |\n|   - test                 |                          38.52s |               32.88s (- %17.15) |\n|                          |                                 |                                 |\n| Sequential time (mean):  |                         3m15.4s |              3m12.25s (- %1.64) |\n+--------------------------+---------------------------------+---------------------------------+\n```\n\nIn this example, pipelines `#725494153` and `#725491719` are combined\ninto the data set labeled `Dataset1`, and pipelines `#725488623` and\n`#725487593` are combined into the data set labeled `Dataset2`. Within\neach data set, the durations of jobs is averaged.\n\nSimilarly, the `Sequential time` of each dataset is the mean of the\nsequential time of each pipeline in that dataset.\n\n## JSON output\n\nYou can get the output of vizpl2 in JSON format using `--json`. \n\n    vizpl2 --json tezos/tezos#874232916 \n\nThis can be combined with `jq` to easily filter the output it like this:\n\n    vizpl2 --json tezos/tezos#874232916 | \\\n      jq 'map(select(.Job.type == \"stage\" or .Job.type == \"pipeline\"))'\n\n## Options\n\nFor the full list of options, pass `--help` to `vizpl2`.\n\n## Interpreting results\n\nHow to read the results:\n\n  - the mean duration of the pipeline (job name written as\n    `[pipeline]`) is the mean end time of the job finishing last.\n\n  - the mean duration time of stages (job name written as `\u003e [ stage\n    name ]`) is the average duration of slowest job of the stage in\n    each pipeline of the data set: `average(forall ds in data sets:\n    max(forall job in ds.stage: job.duration))`.  In other words, it\n    is not the `mean end time of the stage - mean start time` of the\n    stage.\n\nThis means that the mean duration of pipelines depends on how runners\nare scheduled to jobs. On the other hand, this is not true for the\nmean duration of stages, and therefore comparisons made there allow to\ndisregard variations in runner availability.\n\nIdeally, we should calculate the critical path for a pipeline, and\nthem sum the mean duration of each step on the critical path, but the\ntools does not yet handle this.\n\n# Development\n\nUse the package scripts defined in `package.json`:\n\n - `npm run build`: to compile TypeScript to JavaScript.\n - `npm run start`: to compile TypeScript to JavaScript continuously in the background.\n - `npm run test`: to run the test suite.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Farvidnl%2Fvizpl2","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Farvidnl%2Fvizpl2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Farvidnl%2Fvizpl2/lists"}