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.2.tar.gz (10.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.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: socratic_performance-0.1.2.tar.gz
  • Upload date:
  • Size: 10.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.2.tar.gz
Algorithm Hash digest
SHA256 b47f859c0077b4ce98501af8ff900ceabdd7fa6dae10107cf3b07649d1dd5ee5
MD5 b79da637a455c59971e037bcad212bce
BLAKE2b-256 7548b3124955f28da0b7f46fd6003a312af1cbc9f53e7b1dc499a7235d7b896d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for socratic_performance-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52e9e22aada3bac44cee85270101d6a3ffdf49ca1acd976ef916723fd1c300bd
MD5 65a46f3b2b9b1e8ab809c0601532cc8f
BLAKE2b-256 9664534ac07cf711e9d4233dbf66bf9709255b9fafc875e4d748ba95856706f7

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