pysolmeters
Welcome to pysol
Copyright (C) 2013/2025 Laurent Labatut / Laurent Champagnac
pysolmeters is a set of python helpers to populate and get counters, anywhere in the code.
It can be used to instrument low-level APIs and validate stuff with unit testing or push counters toward some monitoring softwares.
Internally, it uses AtomicIntSafe, AtomicFloatSafe and DelayToCountSafe classes, wrapped by a static class Meters, which exposes helper methods.
Usage
To increment integers and floats :
Meters.aii("int_counter")
Meters.afi("float_counter")
To get integers and floats :
vi = Meters.aig("int_counter")
vf = Meters.afg("float_counter")
To put millis toward DelayToCount :
Meters.dtci("dtc1", 0.5)
To get DelayToCount instance
dtc1 = Meters.dtcg("dtc1")
To write all counters to logger :
Meters.write_to_logger()
To reset all counters :
Meters.reset()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pysolmeters-3.13.7.tar.gz.
File metadata
- Download URL: pysolmeters-3.13.7.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40843e01768bdc6cf96e80c733cbc2c4e4ef698e0c9de6170fdcd52f47ce825b
|
|
| MD5 |
3b0a16f58292aa53563d0cfba0f42bec
|
|
| BLAKE2b-256 |
5fd34ef3449d1d613ec2eb56373068b03ddb570af3cf8ce9fb0a496437aafee2
|