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.3.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.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clts_pcp-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 e6f0b1edd80d9e0d87f58faa5605071d528076546b04a1d81ace89e0638bd5ed
MD5 2b0d6c5134ff412728808827dc2eeb62
BLAKE2b-256 4f3220a1ee492474bd71a39ceae4f0daf268e4e2322dfad62b36aee8e2462d36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clts_pcp-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a82b884b2c8c802b7734eef534381f462029eee895bc20c7dbcb66a1a3cef79
MD5 66b1d9a43a38100e93028374d2984116
BLAKE2b-256 c6729cd6a5ac2a88595f97b3b2d4fb1f72a88d911fdb374ad854efa63d879a23

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