Skip to content

Commit 489073b

Browse files
authored
Update README.md
1 parent c8405f3 commit 489073b

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
11
# PythonProfiler
2+
3+
# PythonProfiler
4+
5+
Light-weight, decorator-based **time & memory profiler** that streams events to a central TCP server.
6+
Add `@time_profile` or `@memory_profile` to any Python function and get a unified, time-ordered trace across multiple scripts, processes, or hosts without installing heavyweight agents or sharing files.
7+
![image](https://github.com/user-attachments/assets/0e3f7a74-de75-4c52-9826-9d0c21f9de36)
8+
9+
10+
---
11+
12+
## ✨ Features
13+
14+
| | What it does | Why it matters |
15+
|-----------------------------------|--------------|----------------|
16+
| **Two-line integration** | `from logic.decorators import ProfilingDecorators as P` → decorate functions. | Leaves your business-logic untouched; `functools.wraps` keeps signatures & docstrings. |
17+
| **Wall-clock latency** | Captures `datetime.now()` on entry/exit and ships a pair of timestamps. | Perfect for I/O-bound or distributed workflows where “what waited for what?” matters. :contentReference[oaicite:0]{index=0} |
18+
| **Resident-set memory** | Reads `ru_maxrss` via the `resource` module before & after the call. | Spot leaks and unexpected growth at function granularity on Unix systems. :contentReference[oaicite:1]{index=1} |
19+
| **Global ordering** | Every event carries a Version-1 UUID. | Collision-free merging when dozens of clients fire events in parallel. :contentReference[oaicite:2]{index=2} |
20+
| **Zero external deps** | Uses only the Python standard library (`socket`, `uuid`, `resource`, `datetime`). | Works anywhere Python ≥ 3.8 runs. |
21+
22+
---
23+
24+
## Quick start
25+
26+
```bash
27+
git clone https://github.com/Saher-Amasha/PythonProfiler.git
28+
29+
cd PythonProfiler
30+
python3 -m venv venv
31+
source venv/bin/activate
32+
pip install -r requirements.txt # only std-lib, but black & pytest for dev helpers
33+
34+
```

0 commit comments

Comments
 (0)