No project description provided
Project description
lf-metric-emitter
This tool encapsulates the code needed to emit metrics to the Sasquatch InfluxDB stack. https://sasquatch.lsst.io/index.html
To utilize this tool, two environment variables must be set:
BENCHMARK_ENV
should be set to something consistent, for instance,github-ci
,epic
,local-desktop-1
, etc.KAFKA_API_URL
should be set to the full url. See the Sasquatch documentation for the specific URL.
You'll also need to manually create a Kafka topic to receive the metrics that are emitted. Again, see the Sasquatch documentation for instructions.
With the Kafka topic created, and the environmental variables, metrics can be emitted like so:
# result from a timing bench mark
my_result = 42.0
emitter = Emitter(namespace='lsst.lf',
name='ssppIncubator.bench',
module='PPApplyColourOffset',
benchmark_type:'runtime',
benchmark_unit:'s')
emitter.set_value(my_result)
emitter.emit()
This project was automatically generated using the LINCC-Frameworks python-project-template.
For more information about the project template see the For more information about the project template see the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lf-metric-emitter-0.0.3.tar.gz
.
File metadata
- Download URL: lf-metric-emitter-0.0.3.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acb40b8bdb05c0f8661590795fbce17bb4f26055e88b9dbbcb1bad47a6471059 |
|
MD5 | 9def72da7636962ee15833f8bff7d3a1 |
|
BLAKE2b-256 | 8d9e2b791de87782566af8430efa7c3eadd90501c21fd0761771fe214b90667f |
File details
Details for the file lf_metric_emitter-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: lf_metric_emitter-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f6f92f733cf73f638840179b888bfc984a762d5eb34ba85e25ae3d5db527615 |
|
MD5 | 03751cb306e2757471aabf26050bffe0 |
|
BLAKE2b-256 | 16679f08ac13f9aecd708873f5a19c1371af5a71dfd35873884b3d7e2d9a156a |