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.1.3.tar.gz (16.8 kB view details)

Uploaded Source

File details

Details for the file socratic_performance-0.1.3.tar.gz.

File metadata

  • Download URL: socratic_performance-0.1.3.tar.gz
  • Upload date:
  • Size: 16.8 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.1.3.tar.gz
Algorithm Hash digest
SHA256 a237d879f20d38431c20f8ea6f4d1180fde7ac2a32a7497f5e438e22b086bd67
MD5 191b6f46b3221958851918257b0c2b0b
BLAKE2b-256 7e512dad4ec58db762be024971eabcedba5762d1c019a6a4a7615dcc9f3cab63

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