{"id":14063796,"url":"https://github.com/StartAutomating/PSMetrics","last_synced_at":"2025-07-29T16:32:02.568Z","repository":{"id":159007290,"uuid":"632631145","full_name":"StartAutomating/PSMetrics","owner":"StartAutomating","description":"A Module for Metrics in PowerShell","archived":false,"fork":false,"pushed_at":"2023-05-07T02:00:23.000Z","size":241,"stargazers_count":11,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-24T07:32:25.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StartAutomating.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-25T20:09:13.000Z","updated_at":"2024-09-13T11:22:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"918ae093-8a54-4f80-8b24-1f12c2e96d1d","html_url":"https://github.com/StartAutomating/PSMetrics","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FPSMetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FPSMetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FPSMetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FPSMetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StartAutomating","download_url":"https://codeload.github.com/StartAutomating/PSMetrics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228028621,"owners_count":17858419,"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":[],"created_at":"2024-08-13T07:03:30.754Z","updated_at":"2024-12-04T01:31:30.647Z","avatar_url":"https://github.com/StartAutomating.png","language":"PowerShell","readme":"\u003cdiv align='center'\u003e\n\u003cimg src='Assets/PSMetrics.png' alt='PSMetrics' /\u003e\n\u003c/div\u003e\n\n\nPSMetrics is a module for metrics in PowerShell.\n\nIt lets us describe a metric in a simple script, named `*.metric.ps1`.\n\nOnce we've described a metric, it's easy to calculate it from any appropriate input.\n\nOnce we've calculated a metric, it's easy to format that metric any way we'd like.\n\nPSMetrics includes formatters for [ChartJS](https://chartjs.org) and [PowerShell Universal](https://ironmansoftware.com/powershell-universal-dashboard)\n\n## Using PSMetrics\n\nYou import metrics with Import-Metric.  Once you have done this, you can use the metric a number of different ways.\n\n~~~PowerShell\n# You can run the metric directly and get back it's data\nGet-ChildItem -File -Recurse | FileSizeByExtension\n\n# You can run the metric with an emoji alias to render it as a graph \nGet-ChildItem -File -Recurse | FileSizeByExtension📊\n\n# You can provide an -OutputPath to export the HTML\nGet-ChildItem -File -Recurse | FileSizeByExtension📊 -OutputPath .\\FileSizeByExtension.html\n\n# You can provide an -OutputPath that is a CSV or CLIXML to export the data\nGet-ChildItem -File -Recurse | FileSizeByExtension📊 -OutputPath .\\FileSizeByExtension.Clixml\n~~~\n\n## PSMetrics Action\n\nYou can use PSMetrics in a GitHub action.  Simply create a `*.psmetrics.ps1` file and use the github action in your YAML.\n\n~~~yaml\n- name: UsePSMetrics\n  uses: StartAutomating/PSMetrics@main\n~~~\n\nAny files you output from the action will be checked into your repo (please make sure your github access token allows you to write to the repository)\n\n## Example Metrics\n\nPSMetrics comes with a few example metrics you can use out of the box.\n\n\n|MetricName         |Synopsis               |\n|-------------------|-----------------------|\n|CommandsByNoun     |Commands By Noun       |\n|CommandsByType     |Commands By Type       |\n|CommandsByVerb     |Commands By Verb       |\n|FilesByExtension   |Gets files by extension|\n|FileSizeByExtension|File Size By Extension |\n|PipeScriptFactor   |PipeScript Factor      |\n|TypesByNamespace   |Gets types by namespace|\n\n\n\n## Tools that use PSMetrics\n\n[GitLogger](https://gitlogger.com/GitLogger-Metrics/) uses PSMetrics to standardize the data you can visualize from a repository.\n","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStartAutomating%2FPSMetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStartAutomating%2FPSMetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStartAutomating%2FPSMetrics/lists"}