Skip to main content

Metrics exporter.

Project description

metrics_exporter

How to use

Set the metrics names and the postgres connection:

me = MetricsExporter(
    metricsGroups=[['metric1', 'metric2'], ['metric3']],
    tableName='it',
    user='root',
    password='root',
    dbname='postgres',
    host='localhost',
    port=5432,
    bufferSize=10000
)

For each metrics, 3 other metrics will be calculated:

  • Nomamlized value over the metric group
  • Accumulated value of the metric
  • Normalized accumulated value over the metric group

Now you can insert a new metric for a month in a page/user:

me.insertMetric(
    1, 'pippo', '201005',
    [{
        'metric1': 2,
        'metric2': 4
    }, {
        'metric3': 2
    }]
)

To be sure that all metrics have been saved to the database in the end run:

me.finalize()

Pip package

To update the pip package

python setup.py sdist
twine upload dist/*

Project details


Download files

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

Source Distribution

metrics_exporter-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file metrics_exporter-0.0.2.tar.gz.

File metadata

  • Download URL: metrics_exporter-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for metrics_exporter-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2221e6d39de507a01dc721c80e6be74dceb41fb6e84107eb375fde8850967ad8
MD5 ca482470e532260cb85ea93383237e5d
BLAKE2b-256 8a45931f17d7801359822e675f5cc47f37cce0dba35a073a3547730695903aa2

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