{"id":16852577,"url":"https://github.com/denisidoro/pipers","last_synced_at":"2025-04-11T07:03:28.458Z","repository":{"id":54202564,"uuid":"343176253","full_name":"denisidoro/pipers","owner":"denisidoro","description":"Use pipe expressions in your PromQL queries or code!","archived":false,"fork":false,"pushed_at":"2021-03-03T12:47:42.000Z","size":336,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T17:54:23.200Z","etag":null,"topics":["grafana","pipe","prometheus","query"],"latest_commit_sha":null,"homepage":"https://denisidoro.github.io/pipers","language":"JavaScript","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":"https://github.com/denisidoro.png","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-02-28T18:04:46.000Z","updated_at":"2023-07-25T14:43:55.000Z","dependencies_parsed_at":"2022-08-13T09:10:18.524Z","dependency_job_id":null,"html_url":"https://github.com/denisidoro/pipers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fpipers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fpipers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fpipers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fpipers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisidoro","download_url":"https://codeload.github.com/denisidoro/pipers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239570648,"owners_count":19661128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grafana","pipe","prometheus","query"],"created_at":"2024-10-13T13:47:52.038Z","updated_at":"2025-02-18T23:31:28.568Z","avatar_url":"https://github.com/denisidoro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pipers\n\nUse pipe expressions in your PromQL queries or code!\n\nFor example, the following query...\n```coffee\nsum(irate(node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}(node_cpu_seconds_total){mode='idle'}[5m](node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}(node_cpu_seconds_total)))) / count(count(node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}(node_cpu_seconds_total)) by (cpu))\n```\n...can be written as:\n```coffee\ncpuSeconds = node_cpu_seconds_total\n  | x -\u003e x{instance=~\"$node:$port\",job=~\"$job\"}\n\ncpuCount = cpuSeconds \n  | s -\u003e count(s) by (cpu)\n  | count\n\ncpuIdle = cpuSeconds\n  | s -\u003e s{mode='idle'}[5m]\n  | irate\n  | sum\n\ncpuIdle / cpuCount\n```\n\n## Syntax and live playground\n\nCheck [this page](https://denisidoro.github.io/pipers/) to try it out!\n\n## Using it inside your IDE \n\n### add the binary to your `$PATH`\n```bash\ngit clone https://github.com/denisidoro/pipers\ncargo build --release\n```\n### setup your IDE accordingly\n\nE.g., in VSCode you can use the [Filter Text](https://marketplace.visualstudio.com/items?itemName=yhirose.FilterText) extension:\n\n![Demo](https://user-images.githubusercontent.com/3226564/109806044-f9f08380-7c02-11eb-9429-92d26ee7084c.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisidoro%2Fpipers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisidoro%2Fpipers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisidoro%2Fpipers/lists"}