GithubHelp home page GithubHelp logo

char0n / django-profiler Goto Github PK

View Code? Open in Web Editor NEW
58.0 58.0 12.0 42 KB

django-profiler is util for profiling python code mainly in django projects but can be used also on ordinary python code. It counts sql queries a measures time of code execution. It logs its output via standard python logging library and uses logger profiling. If your profiler name doesn't contain any empty spaces e.g. Profiler('Profiler1') django-profiler will log all the output to the profiling.Profiler logger.

License: Other

Python 100.00%

django-profiler's Introduction

Hi 👋

Vladimír Gorej is a Prague-based software engineer passionate about software/code quality, Functional and Reactive programming. Vladimír is formerly Technical Team Lead of Oracle, Principal Software Engineer at Apiary and held other senior engineering and leading roles in international companies like Ubiquiti Networks or SecurityScorecard. He's been active in the Open Source community for the last ten years and currently utilizes his experience in this field as an Open Source Software Engineer at SmartBear. Vladimír holds all OpenSource Best Practices certifications awarded by The Linux Foundation and is a member of the GitHub Stars program. His favorite programming languages include JavaScript, Python, and Elixir.
GitHub Star programme member
❤️ Sponsor me through GitHub

Latest Blog Posts

Advanced memoization for JavaScript functions with lodash.memoize

Sat Feb 05 2022

How to handle errors in SwaggerUI

Mon Jan 24 2022

How to migrate from querystring to URLSearchParams in Node.js

Thu Oct 14 2021

How to apply the Apache 2.0 License to your Open Source software project

Sat Oct 02 2021

Things I have learned while maintaining JavaScript monorepo with Lerna

Tue Sep 07 2021

➡️ More blog posts

GitHub Stats

GitHub stats GitHub most used languages

django-profiler's People

Contributors

pwhipp avatar robsco-git avatar shivadp 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

Watchers

 avatar  avatar  avatar  avatar

django-profiler's Issues

Support for query lists

As Profiler context manager gets executed, it can measure number of executed queries. API user should also be able to get list of all SQL queries, that have been executed with manager.

e.g.

with Profiler('sql_profiler') as profiler:
Model.objects.filter(has_attribute=True)
print p.sql_list

Substitute profilehook with profile python module

Python 2.7 now contains profile module with virtually the same functionality as profilehook package which uses python-profiles debian package that have installation problems on new ubuntu/xubuntu installations.

Find out if it is even substitutable and if so, substitute it.

timeit module

Use timeit module for making time measurements instead of using time module

Time, Query expectations

It would be nice to define on profiler level assertions/expections and make profiler report all not satisfied assertions/expectations.

Django configuration error while installing library from pip

While installing django-profiler into environment with django installed, django.core.exceptions.ImproperlyConfigured exception is raised. This is caused by the fact that profiler detects that django is installed and tries to import it. But import fails, because profiler tries to use django unconfigured.

Incorrect io import

File "/Users/Shared/workspace/VOSM/CL_StoreMaps/venv/lib/python3.7/site-packages/profiling/init.py", line 9, in
from StringIO import StringIO
ModuleNotFoundError: No module named 'StringIO'

It was wrongly imported
fromStringIO import StringIO.

Please correct this line in _init.py , line 9 to
from io import StringIO

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.