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.1.tar.gz (8.7 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.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: socratic_performance-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 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.1.tar.gz
Algorithm Hash digest
SHA256 8b73da1d0d121227c8baa0ed9d9fb7266f928946b11695123d773d029f12e92e
MD5 aa0e893dadd9066f08a44c71235fea03
BLAKE2b-256 cbf4f1801963a3b95c2e5b2cf454670bf933a3e96908bf4208dbbe2929041603

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for socratic_performance-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 577b6e7359c410e601d192c9b0acf959415f55817b680cb8d0af8d51c8d671ed
MD5 d8cc6680722164c3553b92013868bd3a
BLAKE2b-256 c2310ce497e4494fa50aee81fd539e021086dbf45e0ede567ee210898dfd5c47

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