Skip to main content

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

socratic_performance-0.2.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socratic_performance-0.2.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

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

Hashes for socratic_performance-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b8627ca4b72380e2b933b73306a42940db17c1946b97ec439f1c62e192e6389b
MD5 bad97019499009ca64d59ed1aee78fa4
BLAKE2b-256 dc6e71583acc47e3ed3daba7c83324d3428789584aba76c1b0db39baea9c746b

See more details on using hashes here.

File details

Details for the file socratic_performance-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for socratic_performance-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e5ef1f81062969f5681c51b224b681ca513d095dda772b58a1cb28d0910876
MD5 62664fda52112e768b07358ba7dab2aa
BLAKE2b-256 479bbf9e8fb886ebe799ae621ce15dcceada9d8fa793adc156bafcfbeb27b758

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page