This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
harrison
========

Time a block of code.

Use as the context expression of a ``with`` statement:

.. code:: pyconsole

>>> from harrison import Timer
>>> with Timer() as t:
>>> ...
>>> print t.elapsed_time_ms
12345

When a description string is passed on initialization, the elapsed time
will be printed on completion, keyed by this description.

.. code:: pyconsole

>>> with Timer('My expensive block of code'):
>>> ...
My expensive block of code: 12345 ms

You can also start and stop a Timer explicitly:

.. code:: py

timer = Timer()
timer.start()

some_expensive_function(...)
print timer.elapsed_time_s

another_expensive_function(...)
timer.stop()
print timer.elapsed_time_s

You can also time each execution of a function using a decorator:

.. code:: py

from harrison import profile

@profile('Describes the function')
def some_function():
pass

# Without args, the function name (e.g. 'some_function') will be used
# as the description.
@profile()
def another_function():
pass

You can also use ``RegisteredTimer``, which groups together a bunch of
named timers, provides utilities for serializing their times, and an
optional global timer registry.

Named after John Harrison, the English carpenter and clockmaker who
invented the `marine
chronometer <https: en.wikipedia.org="" wiki="" marine_chronometer="">`__.

Similar libraries
-----------------

This is similar to the library
`contexttimer <https: github.com="" brouberol="" contexttimer="">`__, but that
library is licensed under the GPLv3 which is more restrictive than
two-clause BSD license used here.

Development
-----------

.. code:: sh

pip install -r requirements_dev.txt
rake lint

Contribute
----------

- Issue Tracker: https://github.com/bodylabs/harrison/issues
- Source Code: https://github.com/bodylabs/harrison

Pull requests welcome!

Support
-------

If you are having issues, please let us know.

License
-------

The project is licensed under the two-clause BSD license.
Release History

Release History

1.1.1

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

1.1.0

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

1.0.0

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

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
harrison-1.1.1.tar.gz (5.8 kB) Copy SHA256 Checksum SHA256 Source Jun 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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