{"id":22136038,"url":"https://github.com/mahmoudimus/nose-timer","last_synced_at":"2025-10-26T05:46:26.925Z","repository":{"id":4715909,"uuid":"5863963","full_name":"mahmoudimus/nose-timer","owner":"mahmoudimus","description":"A timer plugin for nosetests (how much time does every test take?)","archived":false,"fork":false,"pushed_at":"2024-07-25T00:04:36.000Z","size":126,"stargazers_count":126,"open_issues_count":2,"forks_count":32,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-16T08:02:06.241Z","etag":null,"topics":["python","testing","testing-tools","timer","timers"],"latest_commit_sha":null,"homepage":"","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/mahmoudimus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-09-18T22:37:13.000Z","updated_at":"2024-08-09T20:43:36.000Z","dependencies_parsed_at":"2024-12-08T20:00:57.894Z","dependency_job_id":"a1f1cc81-7289-42a9-baef-f99a0e95e7d0","html_url":"https://github.com/mahmoudimus/nose-timer","commit_stats":{"total_commits":133,"total_committers":31,"mean_commits":4.290322580645161,"dds":0.5112781954887218,"last_synced_commit":"472d8b514c4acc1824827ea193b686d75524a252"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fnose-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fnose-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fnose-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fnose-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmoudimus","download_url":"https://codeload.github.com/mahmoudimus/nose-timer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493381,"owners_count":22080126,"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":["python","testing","testing-tools","timer","timers"],"created_at":"2024-12-01T19:18:36.186Z","updated_at":"2025-10-26T05:46:21.878Z","avatar_url":"https://github.com/mahmoudimus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"nose-timer\n==========\n\nA timer plugin for nosetests that answers the question: *how much time does every test take?*\n\n.. image:: https://badge.fury.io/py/nose-timer.svg\n    :target: https://badge.fury.io/py/nose-timer\n\n.. image:: https://travis-ci.org/mahmoudimus/nose-timer.svg?branch=master\n   :target: https://travis-ci.org/mahmoudimus/nose-timer\n\n\nInstall\n-------\n\nTo install the latest release from PyPI::\n\n    pip install nose-timer\n\nOr to install the latest development version from Git::\n\n    pip install git+git://github.com/mahmoudimus/nose-timer.git\n\nOr to install the latest from source::\n\n    git clone https://github.com/mahmoudimus/nose-timer.git\n    cd nose-timer\n    pip install .\n\nYou can also make a developer install if you plan on modifying the\nsource frequently::\n\n    pip install -e .\n\n\nUsage\n-----\n\nRun nosetests with the ``--with-timer`` flag, and you will see a list of the\ntests and the time spent by each one (in seconds)::\n\n    myapp.tests.ABigTestCase.test_the_world_is_running: 56.0010s\n    myapp.tests.ABigTestCase.test_the_rest_of_the_galaxy_is_running: 2356.0010s\n\n\nHow do I show only the ``n`` slowest tests?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFor example, to show only the **10** slowest tests, run nosetests with the\n``--timer-top-n`` flag::\n\n    nosetests --with-timer --timer-top-n 10\n\n\nHow do I color the output and have pretty colors?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can highlight slower tests using ``--timer-ok`` and ``--timer-warning`` flags.\nDefault time unit is the second, but you can specify it explicitly, e.g. 1s, 100ms.\n\n- Tests which take less time than ``--timer-ok`` will be highlighted in green.\n- Tests which take less time than ``--timer-warning`` will be highlighted in yellow.\n- All other tests will be highlighted in red.\n\n\nHow do I turn off pretty colors?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn some cases, you may want to disable colors completely. This is done by using the\n``--timer-no-color`` flag. This is useful when running tests in a headless console.\n\n\nHow do I filter results by colors?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt is possible to filter results by color. To do so, you can use the\n``--timer-filter`` flag::\n\n    nosetests --with-timer --timer-filter ok\n    nosetests --with-timer --timer-filter warning\n    nosetests --with-timer --timer-filter error\n\n\nOr to apply several filters at once::\n\n    nosetests --with-timer --timer-filter warning,error\n\nHow do I cause slow tests to fail?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can cause any tests that exceed a threshold to fail by specifying the\n``--timer-fail`` option:\n\n- If you specify ``--timer-fail warning``, slow tests which would be displayed\n  as a warning (i.e. that take more time than  ``--timer-ok``) will fail.\n- If you specify ``--timer-fail error``, slow tests which would be displayed as\n  an error (i.e. that take more time than ``--timer-warning``) will fail.\n\nFor example, to fail any tests that take more than 5 seconds::\n\n    nosetests --with-timer --timer-warning 5.0 --timer-fail error\n\n\nHow do I export the results ?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUse the ``--timer-json-file \u003cmyfile.json\u003e`` flag, it will save the result\nin the following format::\n\n  {\n   'tests':\n    {\n    '\u003ctest key 1\u003e':\n      {\n        'status': 'success'|'error'|'fail,\n        'time': \u003cfloat in s\u003e\n      },\n    '\u003ctest key 2\u003e':\n      {\n        'status': 'success'|'error'|'fail,\n        'time': \u003cfloat in s\u003e\n      },\n     ....\n   }\n\n\nLicense\n-------\n\n``nose-timer`` is MIT Licensed library.\n\n\nContribute\n----------\n\n- Check for open issues or open a fresh issue to start a discussion around a\n  feature idea or a bug.\n- Fork the repository on GitHub to start making your changes to the master\n  branch (or branch off of it).\n- Write a test which shows that the bug was fixed or that the feature\n  works as expected.\n- Send a pull request and bug the maintainer until it gets merged and\n  published.\n- Make sure to add yourself to the author's file in ``setup.py`` and the\n  ``Contributors`` section below :)\n\n\nContributors\n------------\n\n- `@acordiner \u003chttps://github.com/acordiner\u003e`_\n- `@andresriancho \u003chttps://github.com/andresriancho\u003e`_\n- `@cgoldberg \u003chttps://github.com/cgoldberg\u003e`_\n- `@DmitrySandalov \u003chttps://github.com/DmitrySandalov\u003e`_\n- `@e0ne \u003chttps://github.com/e0ne\u003e`_\n- `@ereOn \u003chttps://github.com/ereOn\u003e`_\n- `@fisadev \u003chttps://github.com/fisadev\u003e`_\n- `@garbageek \u003chttps://github.com/garbageek\u003e`_\n- `@HaraldNordgren \u003chttps://github.com/HaraldNordgren\u003e`_\n- `@hugovk \u003chttps://github.com/hugovk\u003e`_\n- `@jakirkham \u003chttps://github.com/jakirkham\u003e`_\n- `@kevinburke \u003chttps://github.com/kevinburke\u003e`_\n- `@mahmoudimus \u003chttps://github.com/mahmoudimus\u003e`_\n- `@satyrius \u003chttps://github.com/satyrius\u003e`_\n- `@skudriashev \u003chttps://github.com/skudriashev\u003e`_\n- `@whodafly \u003chttps://github.com/whodafly\u003e`_\n- `@yarikoptic \u003chttps://github.com/yarikoptic\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmoudimus%2Fnose-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmoudimus%2Fnose-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmoudimus%2Fnose-timer/lists"}