caliper-reader: A Python reader for Caliper files
This Python package reads the native .cali files produced by the Caliper performance profiling library.
You can install caliper-reader with pip:
$ pip install caliper-reader
Alternatively, add the python/caliper-reader path in the cloned
Caliper repository to PYTHONPATH.
Usage
The CaliperReader class reads a Caliper file and then provides its
contents in the records and globals class members, where records
is a Python list-of-dicts containing the recorded performance data
and globals is a Python dict with program metadata about the run.
The dicts represent Caliper attribute:value records: the key is the
Caliper attribute name; the value is a string or list of strings.
The example below prints the avg#inclusive#sum#time.duration metric
for every region path in the provided example profile data file:
import caliperreader as cr
r = cr.CaliperReader()
r.read('example-profile.cali')
metric = 'avg#inclusive#sum#time.duration'
for rec in r.records:
path = rec['path'] if 'path' in rec else 'UNKNOWN'
time = rec[metric] if metric in rec else '0'
if (isinstance(path, list)):
path = "/".join(path)
print("{0}: {1}".format(path, time))
The CaliperReader attributes() function returns the list of Caliper
attributes. The attribute() function returns an Attribute object
to query metadata for a given Caliper attribute name:
>>> a = r.attribute('avg#inclusive#sum#time.duration')
>>> a.get('attribute.unit')
'sec'
You can use the read_caliper_contents function as a shortcut to read
Caliper data without creating a CaliperReader object:
(records,globals) = cr.read_caliper_contents('example-profile.cali')
Use read_caliper_globals if you only need the global (metadata) record:
globals = cr.read_caliper_globals('example-profile.cali')
Authors
Caliper was created by David Boehme, boehme3@llnl.gov.
Release
Caliper is released under a BSD 3-clause license. See LICENSE for details.
LLNL-CODE-678900
Metadata
Release files for caliper-reader 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| caliper_reader-0.4.1.tar.gz | 8.2 kB | Without provenance | Details for caliper_reader-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| caliper_reader-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for caliper_reader-0.4.1-py3-none-any.whl |
Total release size: 18.6 kB
Release files / caliper_reader-0.4.1.tar.gz
| Download URL | caliper_reader-0.4.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8864faf06650420374f38060c5a5f1c8c7d48f0617d9029708d7743b78b50d41
|
|
BLAKE2b-256 checksum How to use checksums |
659fcd17de6baed6a2c6b17af5f9719c591808d56ff42dd4c1e48886899f27fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.6
|
Release files / caliper_reader-0.4.1-py3-none-any.whl
| Download URL | caliper_reader-0.4.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a667c95e8705a6879d69d21a587d736b694a30c55d60ac1a8cacd41ec8b80fc6
|
|
BLAKE2b-256 checksum How to use checksums |
e8eadbda42eca5a31831797d1f9405c3a0fff2ceccb4c1ead530c36086b94cf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.6
|
Security for caliper-reader 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.