{"id":16318136,"url":"https://github.com/scorphus/measures","last_synced_at":"2025-03-22T21:31:43.331Z","repository":{"id":144201252,"uuid":"54505579","full_name":"scorphus/measures","owner":"scorphus","description":"📐 Backstage Measures in Go","archived":false,"fork":false,"pushed_at":"2016-06-09T01:11:01.000Z","size":9,"stargazers_count":25,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T18:51:17.932Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scorphus.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-22T20:11:41.000Z","updated_at":"2023-11-04T03:43:06.000Z","dependencies_parsed_at":"2023-06-18T12:31:06.726Z","dependency_job_id":null,"html_url":"https://github.com/scorphus/measures","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/scorphus%2Fmeasures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fmeasures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fmeasures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fmeasures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scorphus","download_url":"https://codeload.github.com/scorphus/measures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244246521,"owners_count":20422455,"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-10-10T22:10:03.710Z","updated_at":"2025-03-22T21:31:43.283Z","avatar_url":"https://github.com/scorphus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![][travis-badge]][travis-link]\n[![][coverage-badge]][coverage-link]\n![][license-badge]\n![][go-version]\n\n# Measures\n\nA Go package to send application metrics using UDP.\n\n\n## Usage\n\nCreate an instance of `Measures` specifying the client name and server address:\n\n```go\nMeasures = measures.New(\"measures-example\", \"0.0.0.0:3593\")\n```\n\nCount something – a fruit, for example:\n\n```\nMeasures.Count(\"fruits\", 1, measures.Dimensions{\n    \"name\": \"avocado\",\n    \"color\": \"green\",\n})\n```\n\nYou can also measure time spent on something:\n\n```go\nfunc someLengthyOperation() {\n    defer M.Time(\"example\", time.Now(), nil) // No Dimensions in this case\n    time.Sleep(359e6)\n}\n\n```\n\nAnd you can provide Dimensions at once:\n\n```go\nfunc anotherLengthyOperation() {\n    defer M.Time(\"example\", time.Now(), measures.Dimensions{\"number\": 359})\n    time.Sleep(359e6)\n}\n```\n\nOr as you have them:\n\n```go\nfunc yetanotherLengthyOperation() {\n    d := make(measures.Dimensions, 2)\n    defer M.Time(\"example\", time.Now(), d)\n    d[\"number\"] = 359\n    time.Sleep(359e6)\n    d[\"isPrime\"] = true\n}\n```\n\n\n# License\n\n[Simplified BSD][bsd-2cl] © [Measures authors][authors] et [al][contributors]\n\n\n[authors]:         https://github.com/scorphus/measures/blob/master/AUTHORS\n[bsd-2cl]:         https://opensource.org/licenses/BSD-2-Clause\n[contributors]:    https://github.com/scorphus/measures/blob/master/CONTRIBUTORS\n[go-version]:      https://img.shields.io/badge/Go-\u003e=1.5.1-6DD2F0.svg\n[coverage-badge]:  https://img.shields.io/coveralls/scorphus/measures.svg\n[coverage-link]:   https://coveralls.io/github/scorphus/measures\n[license-badge]:   https://img.shields.io/badge/license-BSD_2‑Clause-007EC7.svg\n[travis-badge]:    http://img.shields.io/travis/scorphus/measures.svg\n[travis-link]:     https://travis-ci.org/scorphus/measures\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorphus%2Fmeasures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscorphus%2Fmeasures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorphus%2Fmeasures/lists"}