
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
A plug-and-play Django middleware profiler that tracks API performance, SQL query behavior, and more โ all without code changes or server restarts.
Perfect for developers who want real-time insight into their API behavior during development.
profile run
Once published:
pip install api-profiler
For local development (from repo root):
pip install dist/api_profiler-0.1.0-py3-none-any.whl
Or install in editable mode:
pip install -e .
From your Django project folder, use the CLI to control profiling:
profile run
# Activate all metrics
profile --set all
# Deactivate all
profile --unset all
# Enable specific profiling
profile --set sql response-headers
# Disable specific profiling
profile --unset sql response-body
โก This works on the live running server โ no restart required.
Metric | Description |
---|---|
sql | Query count, total time, repeated queries |
headers | Request and response headers |
params / body | URL params and request body |
response | Response content and size |
response-headers | Response headers |
all | Enables or disables all of the above |
[INFO] METHOD: GET PATH: /users/
[INFO] Headers:
Content-Type: text/plain
Host: 127.0.0.1:8000
...
[INFO] Body: Size: 0 bytes
--------------------------------------------------------------------------------
SQL Queries Summary
Path : /users/
Total : 10 queries
[001]
SELECT ... FROM auth_user
Repeated: 10x | Total Time: 0.000 sec
Total Execution Time: 0.000 sec
--------------------------------------------------------------------------------
[INFO] Response: [] Size: 2 bytes
[INFO] Status: 200 Total time taken: 0.005 seconds
settings.py
modification)logging.config.dictConfig
git clone https://github.com/Av-sek/api-profiler.git
cd api_profiler
pip install -e .
# OR build and install from source
pip install --upgrade build
python -m build
pip install dist/api_profiler-0.1.0-py3-none-any.whl
To use on your Django app:
profile run
Abhishek Ghorashainee ๐ GitHub ยท ๐ LinkedIn
MIT License โ open to all contributions.
FAQs
Django profiling middleware CLI tool
We found that api-profiler 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
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.