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.1.tar.gz (3.7 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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clts_pcp-1.0.1.tar.gz
  • Upload date:
  • Size: 3.7 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.1.tar.gz
Algorithm Hash digest
SHA256 03521ee881f53f54b7de38dc7b2843744a3ef7545922b02d8b4fb76eb02fea5c
MD5 f9f40114b695711d87bc8534008a2337
BLAKE2b-256 587c1abfb18d05823a2ed0763f3492c4e702357ec37c37cb5b519978a2e4a3de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clts_pcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd4637182712be5e0aa56882f82e4e3bf37be94ef7caa741075902c0a7e38a50
MD5 bfec833e946b8687f853a12bf31f21c3
BLAKE2b-256 327e3babe38b4552621667836b70438892385c5c6238b4b6558bef5aba82ae8c

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