Metadata-Version: 2.0
Name: bench-it
Version: 0.2.6
Summary: Quick and easy python benchmarking.
Home-page: http://github.com/scuml/benchit
Author: Stephen Mitchell
Author-email: stephen@echodot.com
License: Copyright 2016 Stephen Mitchell

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Description-Content-Type: UNKNOWN
Description: benchit - Quick n' Easy Python Benchmarking
        -------------------------------------------
        
        Quickly find where your code is spending its time.
        
        |Build Status| |Downloads|
        
        Benchit is intended to be a minimalistic library that times how long it
        takes to get from line A to line B. It helps detect unoptimized code.
        
        Installation
        ~~~~~~~~~~~~
        
        ::
        
            pip install bench-it
        
        Example
        ~~~~~~~
        
        ::
        
            >>> from benchit import BenchIt
            >>> b = BenchIt() # starts the timer
            >>> # do stuff
            >>> b.mark("Stuff Done")
            >>> for i in range(1,5):
            ...   b.mark("In loop")
            ...   pass  # more stuff done
            >>> b.mark("More stuff completed")
            >>> b.display()
            +----------------------+----------+------+-------+----------+---------+---------+
            | Marker               | Method   | Line | Loops | Avg Time | Runtime | Percent |
            +----------------------+----------+------+-------+----------+---------+---------+
            | Stuff Done           | <module> |    2 |     1 |  0.59003 | 0.59003 |    5.86 |
            | In loop              | <module> |    2 |     4 |  1.37800 | 5.51199 |   54.78 |
            | More stuff completed | <module> |    6 |     1 |  3.60235 | 3.60235 |   35.80 |
            | _display             | <module> |   53 |     1 |  0.35842 | 0.35842 |    3.56 |
            +----------------------+----------+------+-------+----------+---------+---------+
            Total runtime: 10.06
        
        How to Use
        ~~~~~~~~~~
        
        Instantiating the class starts the timer.
        
        ::
        
            b = BenchIt()
        
        Set a marker after some code.
        
        ::
        
            b.mark("Stuff Done")
        
        Stop and display the table for analysis.
        
        ::
        
            b.display()
        
        Methods
        ~~~~~~~
        
        ``benchit.__init__()`` Instantiate and start the timer.
        
        ``benchit.mark(marker_name)`` Add marker at this point.
        
        ``benchit.stop()`` Stop the timer.
        
        ``benchit.display()`` Display the table. Stops the timer if running.
        
        Credits
               
        
        *Special thanks Luke Maurits for
        `prettytable <https://pypi.python.org/pypi/PrettyTable>`__*
        
        .. |Build Status| image:: https://secure.travis-ci.org/scuml/benchit.png?branch=master
           :target: http://travis-ci.org/scuml/benchit
        .. |Downloads| image:: https://img.shields.io/pypi/dw/bench-it.svg
           :target: https://pypi.python.org/pypi/bench-it
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
