
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
|Build Status| |Downloads|
Django Bench Runner is a drop-in enhancement of the default django test runner that times how long it takes to run individual tests. It helps detect tests that might need optimization.
Installation
::
pip install django-bench-runner
In settings.py, add:
::
TEST_RUNNER = 'django_bench_runner.runner.BenchRunner'
Usage
~~~~~
Add the ``-b`` (or ``--benchmark``) flag when running your tests.
Colorization
Tests that run under .5 seconds are colored green. The resulting tests
are divvied into 3 groups. The fastest third (yellow), the middle third
(magenta), and the slowest third (red). Red tests do not mean the tests are necessarily bad or in critical need of a speedup <http://www.obeythetestinggoat.com/fast-tests-useless-hot-lava-be-damned.html>
__.
It is just a graphical way to identify the various times of the tests.
Example Output
::
$ ./manage.py test core.tests.test_transfer_money -b --keepdb
Using existing test database for alias 'default'...
..
Test Runtime Percent
-------------------------------------------------------------- --------- ---------
core.tests.test_transfer_money.TestReleaseAmounts
: test_wells_fargo 8.25052 47.81%
: test_wells_fargo_exempt_from_prefunding 9.00663 52.19%
--------------------------- ------- -------
TestReleaseAmounts 17.25715 100.00%
----------------------------------------------------------------------
Ran 2 tests in 17.262s
OK
Django compatibility
Tested and working in Django 1.8 and 1.9.
Credits
Special thanks Sergey Astanin for
tabulate <https://pypi.python.org/pypi/tabulate>
__
.. |Build Status| image:: https://secure.travis-ci.org/scuml/django-bench-runner.png?branch=master :target: http://travis-ci.org/scuml/django-bench-runner .. |Downloads| image:: https://img.shields.io/pypi/dw/django-bench-runner.svg :target: https://pypi.python.org/pypi/django-bench-runner
FAQs
Locate slow tests in your django project.
We found that django_bench_runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.