Skip to main content

Performance stats logger

Project description

https://travis-ci.org/cjrh/perflog.svg?branch=master https://coveralls.io/repos/github/cjrh/perflog/badge.svg?branch=master https://img.shields.io/pypi/pyversions/perflog.svg https://img.shields.io/github/tag/cjrh/perflog.svg https://img.shields.io/badge/install-pip%20install%20perflog-ff69b4.svg https://img.shields.io/pypi/v/perflog.svg

perflog

Structured logging support for application performance and monitoring data

Demo

""" My Application """

import perflog

def main():
    <All the usual application code goes here>


if __name__ == '__main__':
    perflog.set_and_forget()
    main()

There are several parameters for the set_and_forget method that can be used to change the default behaviour. For example, by default the performance log messages will be written every 60 seconds.

Note: in addition to writing performance data to the log message itself, perflog also adds extra logrecord fields. This means that if you’re using a log formatter that writes out all the fields in some kind of structured format (say, logstash_formatter), you will find that the performance data will also be recorded in those fields and can therefore be accessed in tools like Kibana.

Acknowledgements

perflog uses psutil to obtain all the process-related information. Thanks Giampaolo!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perflog-2017.8.7-py2.py3-none-any.whl (18.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file perflog-2017.8.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for perflog-2017.8.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 88e45f8246a221865bc39864654b3cd2fd1f2d6522afef10afeb40944342e202
MD5 23f091f4e7ca2be7932ac767055a053f
BLAKE2b-256 145f851bde5b9c746201975814568657886421b61cb19ed10f24ea3029931389

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