Tools for serving statistic data to carbon/graphite server.
To install package into django need:
add ‘ua2.carbon.middleware.MeasureMiddleware’ at the top of MIDDLEWARE_CLASSES list
into settings.py add next lines:
from ua2.carbon.loaders import django_loader
django_loader()
Usage examples
Measure function execution time
from ua2 import carbon
@carbon.measure('myapp')
def test():
print "Hello World!"
Measure arbitrary block execution time
from ua2 import carbon
def test():
with carbon.Profiler('myapp'):
for i in range(1,100):
print "Hello World!"
Send raw value to carbon
from ua2 import carbon
def test():
for i in range(1,100):
print "Hello World!"
carbon.send('metric.hello.world', 1)
Metadata
Release files for ua2.carbon 0.0.4
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 | |
|---|---|---|---|---|
| ua2.carbon-0.0.4.tar.gz | 3.7 kB | Without provenance | Details |
Release files / ua2.carbon-0.0.4.tar.gz
| Download URL | ua2.carbon-0.0.4.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
738a1f2278b900c6500354b4f37a3429b0642930195e7ee510db9552e8085bce
|
|
BLAKE2b-256 checksum How to use checksums |
76c33028b80e20fdc4ade578522ba38c4ec690128c20b6746a51ac8fdea2b4cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ua2.carbon 0.0.4
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.