locust_csv2openmetrics


Namelocust_csv2openmetrics JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryConsole app and Python API for converting locust's load test CSV formatted reports into the OpenMetrics text format
upload_time2023-11-20 14:10:57
maintainer
docs_urlNone
author360dialog development team
requires_python>=3.10.0,<4.0.0
licenseBSD
keywords locust openmetrics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            About
=====

Console app and Python API for converting `locust`_'s load test CSV formatted
reports into the `OpenMetrics`_ text format.

To use this tool effectively please setup your locust load tests to `store test
statistics in CSV format`_, which will then generate a number of files:
``{CSV_PREFIX}_stats.csv``, ``{CSV_PREFIX}_stats_history.csv``,
``{CSV_PREFIX}_failures.csv`` and ``{CSV_PREFIX}_exceptions.csv``. Out of the
files above, locust_csv2openmetrics is meant to work with only the
``{CSV_PREFIX}_stats.csv`` file.

.. _`locust`: https://locust.io/
.. _`OpenMetrics`: https://openmetrics.io/
.. _`store test statistics in CSV format`: https://docs.locust.io/en/stable/retrieving-stats.html

Installation
============

To install locust_csv2openmetrics run::

    $ pip install locust_csv2openmetrics

Console app usage
=================

Quick start::

    $ locust_csv2openmetrics <filename>

Show help::

    $ locust_csv2openmetrics --help

Python API usage
================

Quick start::

    >>> import locust_csv2openmetrics as lom

    >>> collector = lom.collect_locust_stats("examples/locust_stats.csv")
    >>> lom.write_openmetrics_to_textfile("./metrics.txt", lom.REGISTRY)

Contribute
==========

If you find any bugs, or wish to propose new features `please let us know`_.

If you'd like to contribute, simply fork `the repository`_, commit your changes
and send a pull/merge request.

.. _`please let us know`: https://gitlab.com/360dialog/open-source/locust_csv2openmetrics/-/issues/new
.. _`the repository`: https://gitlab.com/360dialog/open-source/locust_csv2openmetrics

Development process
-------------------

Before you start you'll need Make, Python and Poetry.

This project doesn't require system wide installation, simply clone the
repository and initialize its development runtime environment to get started::

    $ git clone git@gitlab.com:360dialog/open-source/locust_csv2openmetrics.git
    $ cd locust_csv2openmetrics
    $ poetry install --with dev --sync

If you do not wish to install Make, Python or Poetry on your system you can use
the dockerized version of this project instead, by replacing all of your
``make`` calls, such as::

    $ poetry run make [quiet=1] [PYTHONWARNINGS=all] [TARGET] ...

with::

    $ ./dockerized.sh [quiet=1] [PYTHONWARNINGS=all] [TARGET] ...

Show help::

    $ poetry run make help

    # dockerized version:
    $ ./dockerized.sh help

    Usage: make [quiet=1] [PYTHONWARNINGS=all] [TARGET] ...

    Targets:
      help                                  Display this help message
      test.unit                             Run the unit tests
      test.one                              Run only a specific unit test (module, module.TestCase or module.TestCase.test_method)
      test                                  Run the entire test suite (unit tests, coverage, ...)

Run the test suite, *please* do this often during development::

    $ poetry run make quiet=1 PYTHONWARNINGS=all test

    # dockerized version:
    $ ./dockerized.sh quiet=1 PYTHONWARNINGS=all test

Release process
---------------

This project's release process is currently manual in its nature and attempts
to mimic Django's release process, as described in:

- https://docs.djangoproject.com/en/4.2/internals/release-process/
- https://docs.djangoproject.com/en/4.2/internals/git/

Its Python packages are hosted on PyPI, and this is how to build+publish its
Python package on a new release::

    $ poetry publish --build

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "locust_csv2openmetrics",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.0,<4.0.0",
    "maintainer_email": "",
    "keywords": "Locust,OpenMetrics",
    "author": "360dialog development team",
    "author_email": "info@360dialog.com",
    "download_url": "https://files.pythonhosted.org/packages/06/3d/f3cea456ea9f67d569d27a68f7448c3531bc05808d0595b8919b7dbb2051/locust_csv2openmetrics-1.0.0.tar.gz",
    "platform": null,
    "description": "About\n=====\n\nConsole app and Python API for converting `locust`_'s load test CSV formatted\nreports into the `OpenMetrics`_ text format.\n\nTo use this tool effectively please setup your locust load tests to `store test\nstatistics in CSV format`_, which will then generate a number of files:\n``{CSV_PREFIX}_stats.csv``, ``{CSV_PREFIX}_stats_history.csv``,\n``{CSV_PREFIX}_failures.csv`` and ``{CSV_PREFIX}_exceptions.csv``. Out of the\nfiles above, locust_csv2openmetrics is meant to work with only the\n``{CSV_PREFIX}_stats.csv`` file.\n\n.. _`locust`: https://locust.io/\n.. _`OpenMetrics`: https://openmetrics.io/\n.. _`store test statistics in CSV format`: https://docs.locust.io/en/stable/retrieving-stats.html\n\nInstallation\n============\n\nTo install locust_csv2openmetrics run::\n\n    $ pip install locust_csv2openmetrics\n\nConsole app usage\n=================\n\nQuick start::\n\n    $ locust_csv2openmetrics <filename>\n\nShow help::\n\n    $ locust_csv2openmetrics --help\n\nPython API usage\n================\n\nQuick start::\n\n    >>> import locust_csv2openmetrics as lom\n\n    >>> collector = lom.collect_locust_stats(\"examples/locust_stats.csv\")\n    >>> lom.write_openmetrics_to_textfile(\"./metrics.txt\", lom.REGISTRY)\n\nContribute\n==========\n\nIf you find any bugs, or wish to propose new features `please let us know`_.\n\nIf you'd like to contribute, simply fork `the repository`_, commit your changes\nand send a pull/merge request.\n\n.. _`please let us know`: https://gitlab.com/360dialog/open-source/locust_csv2openmetrics/-/issues/new\n.. _`the repository`: https://gitlab.com/360dialog/open-source/locust_csv2openmetrics\n\nDevelopment process\n-------------------\n\nBefore you start you'll need Make, Python and Poetry.\n\nThis project doesn't require system wide installation, simply clone the\nrepository and initialize its development runtime environment to get started::\n\n    $ git clone git@gitlab.com:360dialog/open-source/locust_csv2openmetrics.git\n    $ cd locust_csv2openmetrics\n    $ poetry install --with dev --sync\n\nIf you do not wish to install Make, Python or Poetry on your system you can use\nthe dockerized version of this project instead, by replacing all of your\n``make`` calls, such as::\n\n    $ poetry run make [quiet=1] [PYTHONWARNINGS=all] [TARGET] ...\n\nwith::\n\n    $ ./dockerized.sh [quiet=1] [PYTHONWARNINGS=all] [TARGET] ...\n\nShow help::\n\n    $ poetry run make help\n\n    # dockerized version:\n    $ ./dockerized.sh help\n\n    Usage: make [quiet=1] [PYTHONWARNINGS=all] [TARGET] ...\n\n    Targets:\n      help                                  Display this help message\n      test.unit                             Run the unit tests\n      test.one                              Run only a specific unit test (module, module.TestCase or module.TestCase.test_method)\n      test                                  Run the entire test suite (unit tests, coverage, ...)\n\nRun the test suite, *please* do this often during development::\n\n    $ poetry run make quiet=1 PYTHONWARNINGS=all test\n\n    # dockerized version:\n    $ ./dockerized.sh quiet=1 PYTHONWARNINGS=all test\n\nRelease process\n---------------\n\nThis project's release process is currently manual in its nature and attempts\nto mimic Django's release process, as described in:\n\n- https://docs.djangoproject.com/en/4.2/internals/release-process/\n- https://docs.djangoproject.com/en/4.2/internals/git/\n\nIts Python packages are hosted on PyPI, and this is how to build+publish its\nPython package on a new release::\n\n    $ poetry publish --build\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Console app and Python API for converting locust's load test CSV formatted reports into the OpenMetrics text format",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "locust",
        "openmetrics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c2da015d566cac96123d8713c70d2301396b4dac5d7e75f75b951547055110f",
                "md5": "55ab3d5d106fa1df5c516e9b7a0c5b25",
                "sha256": "38c90ae764184382f0f719fb355e0a6beabc3ec991c1759520a40de7410b280d"
            },
            "downloads": -1,
            "filename": "locust_csv2openmetrics-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55ab3d5d106fa1df5c516e9b7a0c5b25",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0,<4.0.0",
            "size": 4956,
            "upload_time": "2023-11-20T14:10:55",
            "upload_time_iso_8601": "2023-11-20T14:10:55.898445Z",
            "url": "https://files.pythonhosted.org/packages/7c/2d/a015d566cac96123d8713c70d2301396b4dac5d7e75f75b951547055110f/locust_csv2openmetrics-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "063df3cea456ea9f67d569d27a68f7448c3531bc05808d0595b8919b7dbb2051",
                "md5": "f8c708163f3ad247387a07f20c813b36",
                "sha256": "dd8b6a7f59d1df8851afb31333be45d510b26c1a61472addbdecced3ea73ea68"
            },
            "downloads": -1,
            "filename": "locust_csv2openmetrics-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f8c708163f3ad247387a07f20c813b36",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0,<4.0.0",
            "size": 4943,
            "upload_time": "2023-11-20T14:10:57",
            "upload_time_iso_8601": "2023-11-20T14:10:57.363389Z",
            "url": "https://files.pythonhosted.org/packages/06/3d/f3cea456ea9f67d569d27a68f7448c3531bc05808d0595b8919b7dbb2051/locust_csv2openmetrics-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-20 14:10:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "locust_csv2openmetrics"
}
        
Elapsed time: 0.14649s