{"id":30883284,"url":"https://github.com/globocom/measures","last_synced_at":"2025-10-28T20:48:53.725Z","repository":{"id":23228997,"uuid":"26586433","full_name":"globocom/measures","owner":"globocom","description":"Backstage Measure","archived":false,"fork":false,"pushed_at":"2023-10-18T01:56:47.000Z","size":35,"stargazers_count":17,"open_issues_count":3,"forks_count":7,"subscribers_count":83,"default_branch":"master","last_synced_at":"2025-08-16T11:32:02.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/globocom.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-13T12:20:27.000Z","updated_at":"2023-10-18T01:56:51.000Z","dependencies_parsed_at":"2022-07-25T09:47:14.177Z","dependency_job_id":null,"html_url":"https://github.com/globocom/measures","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/measures","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fmeasures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fmeasures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fmeasures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fmeasures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/measures/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fmeasures/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166943,"owners_count":25233959,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-08T09:44:12.653Z","updated_at":"2025-10-28T20:48:53.637Z","avatar_url":"https://github.com/globocom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"README\n======\n\nA python library to send application metrics using UDP.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    pip install measures\n\n\nUsage\n-----\n\n* count\n\n.. code-block:: python\n\n    from measures import Measure\n    measure = Measure('myclient', ('localhost', 1984))\n    measure.count('mymetric', dimensions={'name': 'john'})\n\n* time (measure time spent on a given block)\n\n.. code-block:: python\n\n    import time\n    from measures import Measure\n    measure = Measure('myclient', ('localhost', 1984))\n    with measure.time('mymetric'):\n        # do some slow operation:\n        time.sleep(3.14159)\n\n.. code-block:: python\n\n    import time\n    from measures import Measure\n    measure = Measure('myclient', ('localhost', 1984))\n    with measure.time('mymetric') as dimensions:\n        # do some slow operation:\n        time.sleep(1.61803)\n        # add any relevant information, if necessary:\n        dimensions['relevant_info'] = 'pertinent_info'\n\n\n* send\n\n.. code-block:: python\n\n    from measures import Measure\n    measure = Measure('myclient', ('localhost', 1984))\n    dimensions = {\n        'time': 10.1,\n        'relevant_info': pertinent_info\n    }\n    measure.send('mymetric', dimensions)\n\n* multiple destinations\n\nMetrics can be sent to more than one backend\n\n.. code-block:: python\n\n    from measures import Measure\n\n    measure = Measure('myclient', [('backend.host.1', 1984), ('backend.host.2', 1984)]\n\n\nContributing\n------------\n\n* Set up your environment\n\n.. code-block:: bash\n\n    git clone https://github.com/globocom/measures.git\n    cd measures\n    mkvirtualenv measures\n    pip install -r test_requirements.txt\n\n* Run the tests\n\n.. code-block:: bash\n\n    make tests\n\n* Write tests for your new feature or bug fix\n* Write needed code changes\n* Iterate, have fun :)\n* Make a pull request with your changes\n\n\nWho do I talk to?\n-----------------\n\n* File an issue at https://github.com/globocom/measures or contact us at\n  busca@corp.globo.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fmeasures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fmeasures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fmeasures/lists"}