You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cwtimer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cwtimer

Pythonic timing tracker with reporting to Cloudwatch

0.0.2
pipPyPI
Maintainers
1

cwtimer

'cwtimer' does one simple thing, track the timing of a 'with' statement block and report to AWS Cloudwatch.

Install

.. code-block:: shell

$ pip install cwtimer

Example

.. code-block:: python

from cwtimer import cwtimer
import time

with cwtimer(namespace='MyNameSpace', metric_name='MyMetric',
             dimensions={'MyDimension':'Value'}):
    time.sleep(1)
    # 1.0s reported to cloudwatch metric

Keywords

timer

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts