Skip to main content

KXY, a package for profiling remotely

Project description

kxy-codew

kxy-codew is a lightweight Python profiling tool that makes it easy to measure the performance of your entire application or specific functions. Results are centralized on https://kxy.codew.es, where you get a detailed performance report via a sharable link.

Features

  • Profile your entire Python application with a single call.
  • Decorator to profile any function on every call.
  • Get performance reports with one-click access.
  • Simple to integrate with your code.

Installation

pip install kxy-codew

Usage

  1. Sign up at https://kxy.codew.es, create an App, and then and get your API token.

Profile the entire application

from src.kxy_codew import set_token, performance


set_token("NcPi_dCJ78VjxmZ4M..............")
performance.init_kxy()

# Your application code here

When the program ends, it will print a link to the profiling report like:

Profile report available at: https://7176.codew.es/profile_g2dot/3884a9eb-c74c-4aac-8443-4536629d82c4

Profile a specific function

from src.kxy_codew import set_token, performance

set_token("NcPi_dCJ78VjxmZ4M..............")

@performance.profile
def busy_wait(duration):
    x = 0
    for i in range(duration * 10000000):
        x = duration * 100 - 20 / 12
        x += 1
    return x

busy_wait(10)
busy_wait(30)
busy_wait(100)

After every execution of the decorated function, a detailed profiling record is added to the panel on https://kxy.codew.es

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

kxy_codew-0.1.54.tar.gz (74.5 kB view details)

Uploaded Source

Built Distribution

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

kxy_codew-0.1.54-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file kxy_codew-0.1.54.tar.gz.

File metadata

  • Download URL: kxy_codew-0.1.54.tar.gz
  • Upload date:
  • Size: 74.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for kxy_codew-0.1.54.tar.gz
Algorithm Hash digest
SHA256 01c87dc8b126a6af10d5bf80054d3c94c14bc051fda7799456f352a874ef97aa
MD5 4951c4b3b2c67d9d9812b1387617a401
BLAKE2b-256 cfc15f2a2f9af3dc64e5b469ea8bf1e59ec397bc66c53565c90ad2a631d05a5d

See more details on using hashes here.

File details

Details for the file kxy_codew-0.1.54-py3-none-any.whl.

File metadata

  • Download URL: kxy_codew-0.1.54-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for kxy_codew-0.1.54-py3-none-any.whl
Algorithm Hash digest
SHA256 4102d0b0fe50af79e967569aca3bb6bb5e2fa1cb6652e29e8ffaf57b1ebd4778
MD5 4e441fe83f35e6018df3b8227d931f7c
BLAKE2b-256 c64a9248a1283e456f6abe6ca7db84d3052133ebbed46d1ed3d96a7348a0bffa

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