{"id":28559206,"url":"https://github.com/toastdriven/chrono","last_synced_at":"2025-06-10T08:36:24.052Z","repository":{"id":11502714,"uuid":"13980759","full_name":"toastdriven/chrono","owner":"toastdriven","description":"A (BSD licensed) context manager for timing execution.","archived":false,"fork":false,"pushed_at":"2013-12-03T09:42:44.000Z","size":136,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-07T16:54:56.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://chrono-bench.readthedocs.org/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toastdriven.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2013-10-30T08:11:59.000Z","updated_at":"2019-08-13T15:29:07.000Z","dependencies_parsed_at":"2022-09-23T23:00:36.678Z","dependency_job_id":null,"html_url":"https://github.com/toastdriven/chrono","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fchrono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fchrono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fchrono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fchrono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toastdriven","download_url":"https://codeload.github.com/toastdriven/chrono/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fchrono/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259039677,"owners_count":22796891,"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":"2025-06-10T08:36:13.464Z","updated_at":"2025-06-10T08:36:24.031Z","avatar_url":"https://github.com/toastdriven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"======\nchrono\n======\n\nA (BSD licensed) context manager for timing execution. Useful for benchmarking\neveryday Python code easily/cleanly.\n\n\nUsage\n=====\n\nUsage is trivial. Simply wrap your code in a ``Timer`` context manager.\nExample::\n\n    from chrono import Timer\n\n    with Timer() as timed:\n        # Put whatever logic you want here.\n        # ``for`` loops are great here for timing things that are very fast.\n\n    print(\"Time spent: {0} seconds\".format(timed.elapsed))\n\n\nRequirements\n============\n\n* Python 2.6+ or Python 3.3+ (may work on Python 2.5)\n\n\nLicense\n=======\n\nBSD\n\n\nDocs\n====\n\nhttp://chrono-bench.readthedocs.org/en/latest/\n\n\nShortcomings\n============\n\nThis is implemented in pure Python, so it doesn't have the accuracy a C\nextension would have. There's also overhead for the context manager function\ncalls, so don't use this to bench C code.\n\nThat said, for most everyday usage of Python, it's very helpful.\n\n\nRunning Tests\n=============\n\nSetup::\n\n    $ git clone https://github.com/toastdriven/chrono.git\n    $ cd chrono\n    $ virtualenv -p python3 env3\n    $ . env3/bin/activate\n    $ pip install nose\n\nRunning::\n\n    $ nosetests -s -v tests.py\n\n``chrono`` is maintained with 100% passing tests at all times.\n\n\nChangelog\n=========\n\nDev\n    *\n\nv1.0.2\n    * Added wheel integration\n    * Added a fallback for unittest2\n    * Added TravisCI integration\n    * Added links to the docs\n\nv1.0.1\n    * Added initial docs\n    * Fixed up the main docstring in ``Timer``\n\nv1.0.0\n    * Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoastdriven%2Fchrono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoastdriven%2Fchrono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoastdriven%2Fchrono/lists"}