Giter Site home page Giter Site logo

django-performance-testing's People

Contributors

1se avatar kairichard avatar konstantinpae avatar yunera avatar zsoldosp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-performance-testing's Issues

Django 2 support

Hi, is there any plan to support Django 2.0?

I'm getting this error:

Invalid template library specified. ImportError raised when trying to load 'django_performance_testing.templatetags.djpt_limits': cannot import name 'getargspec'

Thx

new flak8 fails the build

flake8 django_performance_testing tests proof-of-concepts
tests/testapp/sixmock.py:2:80: E501 line too long (86 > 79 characters)
make: *** [lint] Error 1
ERROR: InvocationError: '/usr/bin/make test lint docs'

support setting_changed test signal for settings.DJPT_KNOWN_LIMITS_DOTTED_PATHS

as currently it's initialized once

the difficulty why it wasn't done as part of #4 is that

  • there are many different registries created during testing and they all might be effected. Some might mock out the actual class loading (as good unit tests should), but some might not, and thus it would cause issues when the mocked tests change it to ['blah', 'no.such.module']
  • also, this could get even more complicated after #11

support combining multiple result files into a single one a'la coverage

it was out of scope for #21 which already turned out to be quite big

the suggestion is to have a djpt_combine_result_files command that takes filepaths as *args (LabelCommand) and reads all of them to memory, then write it out into a single file named django_performance_testing.serializer.get_datafile_path

The idea behind using labels instead of accepting file patterns and then converting them to filepaths based on glob or re or similar is to keep things simple here.

people running things in parallel would be expected to have different file names for each run in their settings (e.g.: djpt.results_collected.$$ to get the running process's id), and then do the bash magic themselves (e.g.: manage.py $(ls djpt.results_collected*)). Probably this should be documented :)

support displaying the actual queries that failed the limit

current workaround to achieve this is

            from django_performance_testing.signals import results_collected
            def dump_queries(sender, results, context, **kwargs):
                try:
                    write_result, = (r for r in results if r.name =='write')
                    if write_result.queries:
                        print '\n'.join(q['sql'] for q in  write_result.queries)
                except ValueError:
                    pass
            results_collected.connect(dump_queries)
            with QueryBatchLimit(write=0):
                ....

timing limits don't work with pytest-django

Hello, I use pytest-django to be able to run tests with pytest runner. Query limits work well, timing doesn't. Pytest is a popular test runner (2500 github stars) and allows for more comfortable asserting (assert 1 < 2 vs. self.assertGreaterThan(2,1))

Please look at possibility of supporting pytest.

$ pip freeze | egrep '(test|Django)'
Django==1.11.9
django-performance-testing==0.7.3
pytest==3.2.5
pytest-cov==2.5.1
pytest-django==3.1.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.