Skip to main content

Fast, easy, pretty and readable program instrumentation.

Project description

Kepler

Wish you could see stuff like this about your program?

image

Kepler meticulously tracks your program, and creates simply and easily readable reports to help you understand what they're doing.

Kepler is not a replacement for a good profiling tool, nor is it necessarily a great production implementation tool. Kepler is designed to be that go-to tool in your toolbelt for quick and dirty measurements of your programs.

Installing Kepler

pip install kepler

Kepler in action

The first thing you should do with Kepler is annotate a function or two you want to time with @kepler.time, and then add a kepler.report() call to your amin function.

Here's the script that produced the screenshot above:

import kepler, random, time

@kepler.time("do some stuff")
def do_some_stuff():
    split = kepler.stopwatch("watch")
    for i in kepler.time("loop", range(20)):
        with kepler.time("sleep"):
            time.sleep(random.random() / 100)
        if i % 2 == 1:
            with kepler.time("overhead"):
                split("odd")
        else:
            with kepler.time("overhead"):
                split("even")

@kepler.time
def main():
    with kepler.time("sloooow"):
        time.sleep(0.3)
    do_some_stuff()

main
kepler.report()

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kepler_lib-0.1.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

kepler_lib-0.1-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

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