This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

Swiss Time - A diagnostic code timer

Swiss Time is a diagnostic tool for finding slow spots in code. It sits somewhere between a raw timer and a profiler.

<https://github.com/built/swisstime>

Once started, each call to tick() will record a time difference along a label that you provide.

In this way you build a timeline over the portion of code you are analyzing.

You can print a report of the results or gather report data to process your own way.

Usage

Import and start the timer at the beginning of the code you want to analyze.

>>> import swisstime
>>> swisstime.start()

At the end of each section you want measured, call tick() with a description of that piece of code:

>>> swisstime.tick("Load input image")

Do this after each section you are measuring:

>>> swisstime.tick("Build masks")

To display a report of your results, print the output of swisstime.report():

>>> print( swisstime.report() )

Your output will be a table of times and labels for each section you measured.

If you want the raw report data you can call:

>>> swisstime.data()

to get a list of label/time tuples.

Calling start() will reset all data and begin the analysis again.

Release History

Release History

0.9.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
swisstime-0.9.0-py2.py3-none-any.whl (3.7 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Feb 9, 2016
swisstime-0.9.0.tar.gz (2.1 kB) Copy SHA256 Checksum SHA256 Source Feb 9, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting