معرفی شرکت ها


bench-it-1.0.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Quick and easy python benchmarking.
ویژگی مقدار
سیستم عامل -
نام فایل bench-it-1.0.1
نام bench-it
نسخه کتابخانه 1.0.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Stephen Mitchell
ایمیل نویسنده stephen@echodot.com
آدرس صفحه اصلی http://github.com/scuml/benchit
آدرس اینترنتی https://pypi.org/project/bench-it/
مجوز Copyright 2016-2018 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.
benchit - Quick n' Easy Python Benchmarking ------------------------------------------- Quickly find where your code is spending its time. |Build Status| Benchit is intended to be a minimalistic library that times how long it takes to get from point A to point B. It helps detect unoptimized code. Benchit is only compatible with python 3. For python 2 support, use benchit==0.2.6 (https://pypi.python.org/pypi/bench-it/0.2.6) Installation ~~~~~~~~~~~~ :: pip install bench-it Example ~~~~~~~ :: from benchit import BenchIt from time import sleep def demo_benchmark(): b = BenchIt() # starts the timer # do stuff sleep(1); b() # Add marker after this code. Code used as marker name. sleep(.2); sleep(.3); sleep(.4); b("More stuff done") # Add a custom named marker for i in range(1, 5): sleep(.1); b() # Code can be marked in a loop b.display() # Display output as a table demo_benchmark() BenchIt +-----------------+----------------+------------+------+----------+---------+---------+ | Marker | Method | Line | Hits | Avg Time | Runtime | Percent | +-----------------+----------------+------------+------+----------+---------+---------+ | sleep(1) | demo_benchmark | demo.py:9 | 1 | 1.01341 | 1.01341 | 43.33 | | More stuff Done | demo_benchmark | demo.py:14 | 1 | 0.91278 | 0.91278 | 39.03 | | sleep(.1) | demo_benchmark | demo.py:17 | 4 | 0.10306 | 0.41223 | 17.63 | +-----------------+----------------+------------+------+----------+---------+---------+ Total runtime: 2.33860 How to Use ~~~~~~~~~~ Instantiating the class starts the timer. BenchIt is run as a singleton. Re-instantiating anywhere in your code will pull in the previously instantiated timer. To create a new timer, initialize BenchIt with a unique name. :: b = BenchIt() b2 = BenchIt() # b == b2 b3 = BenchIt("Timer A") # b != b3 Set a marker after some code. :: call_a_method(); b() # Quickly add a marker after a method method1() method2() b("Two methods called") # Or create a manual marker after a chunk of code Stop and display the table for analysis. :: b.display() Methods ~~~~~~~ ``benchit.__init__()`` Instantiate and start the timer. ``benchit.__call__(marker_name)`` Add marker at this point. ``benchit.stop()`` Optionally, stop the timer at a point. ``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


نحوه نصب


نصب پکیج whl bench-it-1.0.1:

    pip install bench-it-1.0.1.whl


نصب پکیج tar.gz bench-it-1.0.1:

    pip install bench-it-1.0.1.tar.gz