Performance monitoring and caching utilities for AI systems
Project description
Socratic Performance
Performance monitoring and caching utilities for AI systems.
Features
- QueryProfiler: Database query profiling and performance monitoring
- TTLCache: Time-based function result caching decorator
Installation
pip install socratic-performance
Usage
Query Profiler
from socratic_performance import QueryProfiler
profiler = QueryProfiler()
@profiler.profile
def expensive_query():
# Your database query here
pass
expensive_query()
stats = profiler.get_stats()
print(stats)
TTL Cache
from socratic_performance import cached
@cached(ttl_minutes=5)
def compute_something(x):
return x * x
result1 = compute_something(10) # Computed
result2 = compute_something(10) # Cached (5 min)
Documentation
- Performance Profiling Guide - Complete guide to performance profiling, query optimization, metrics collection, and bottleneck identification
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file socratic_performance-0.2.0.tar.gz.
File metadata
- Download URL: socratic_performance-0.2.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8627ca4b72380e2b933b73306a42940db17c1946b97ec439f1c62e192e6389b
|
|
| MD5 |
bad97019499009ca64d59ed1aee78fa4
|
|
| BLAKE2b-256 |
dc6e71583acc47e3ed3daba7c83324d3428789584aba76c1b0db39baea9c746b
|
File details
Details for the file socratic_performance-0.2.0-py3-none-any.whl.
File metadata
- Download URL: socratic_performance-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7e5ef1f81062969f5681c51b224b681ca513d095dda772b58a1cb28d0910876
|
|
| MD5 |
62664fda52112e768b07358ba7dab2aa
|
|
| BLAKE2b-256 |
479bbf9e8fb886ebe799ae621ce15dcceada9d8fa793adc156bafcfbeb27b758
|