Skip to main content

Collecting and listing tasks and timestamps

Project description

clts_pcp

This module allows to measure time lapses through several points in your python script and get a table by the end of the script. The table is gotten in both ASCII and HTML - the HTML version is prepared mainly to be sent through email.

Usage

Import the module

import clts_pcp

Set the context

to set the title of the table (context):

clts.setcontext('Testing lts v2')

and collect an initial timestamp:

tstart=clts.getts()

colect elapsed times

Elapsed time from the start

#(... step 1 )
clts.elapt["step 1 (successful)."]=clts.deltat(tstart)
t1=clts.getts()

Elapsed time from the start

#(... step 2 )
clts.elapt["step 2 (successful)."]=clts.deltat(tstart)

or elapsed time from any previous timestamp:

clts.elapt["step 1-2 (successful)."]=clts.deltat(t1)

get the table

clts.listtimes()
Task(s) by Testing lts v2 watch time (secs) proc time (secs)
step 1 (successful). 2.20 0.00
step 2 (successful). 5.30 0.00
step 1-2 (successful). 3.10 0.00

In the case you want the html version of the table, use:

toemail = clts.listtimes()

and use the toemail as the body of the email.

PCP, December 2024

You can use GitHub-flavored Markdown to write your content.

Project details


Download files

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

Source Distribution

clts_pcp-1.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clts_pcp-1.0.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file clts_pcp-1.0.2.tar.gz.

File metadata

  • Download URL: clts_pcp-1.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for clts_pcp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 28edf1bae3e86aebc3374103e565bf403a7cecae8030dc605daf9e22b3e86163
MD5 4812a4f9c9f07a784830e5ece0f791ea
BLAKE2b-256 c5dcad05e44b78c3ac347bca4b089ee9dd050696900ab510c8606bbe6f8fb84c

See more details on using hashes here.

File details

Details for the file clts_pcp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: clts_pcp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.0

File hashes

Hashes for clts_pcp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a470615390cc32c3d948240890b3adcd8a046e92225a80dd139c92c5dc676b20
MD5 c26fc4670aa3f731d212e3287d959f1d
BLAKE2b-256 ca9eb06d4d2e7bd1991cf6f497c8829a95d44897dfc2233e41ae148124694c97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page