robotframework-system-trace-library


Namerobotframework-system-trace-library JSON
Version 1.2.11 PyPI version JSON
download
home_pagehttps://github.com/doguz2509/robotframework_system_trace_library
SummaryRobotFramework extended keyword library; Allow background system tracing; aTop+
upload_time2021-04-08 18:43:01
maintainer
docs_urlNone
authorDmitry Oguz
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # System Trace Library (Version 1.2.11)

## Overview
SystemTraceLibrary allow collect system data of target linux host during any Robotframework 
testing process being running

### Architecture
Main keyword library executing background python threads for SqlLite db node, separate theads for system trace collecting 
plugins
By default library contain 'aTopPlugIn'. 'atop' command being executing with predefined interval & its out put parsed as following:
#### aTop System Level
System level portion of 'atop' being storing in database, and later can be shown as chart in special html page
Link to it logged to robotframework regular log
#### aTop Process Level
TBD in future releases
#### PlugIn extension API
Library provide special API for create custom plugins (SystemTraceLibrary.api.[plugins, model])


## Installation

    python -m pip install robotframework_system_trace_library

## Usage

LibDoc: [Library documentation](docs/SystemTraceLibrary.html)

### Test/Keywords within *.robot file

    *** Settings ***
    Library  SystemTraceLibrary 
    ...     [location (Default: logs)] 
    ...     [file_name (Default: system_trace.db)]
    ...     [cumulative (Default: False)]
    ...     [custom_plugins (Default: None)]

    Suite Setup  run keywords  create host connection  ${HOST}  ${USER}  ${PASSWORD}  [${PORT} (Default: 22)] 
    ...                 [alias=${SUITE_NAME} (Default: user@host)]
    ...          AND  start trace plugin  aTopPlugIn  interval=1s
    Test Setup   Start period  ${TEST_NAME}
    Test Teardown  run keywords  Stop period   ${TEST_NAME}
    ...             AND  generate module statistics  ${TEST_NAME}
    Suite Teardown  Close host connection  alias=${SUITE_NAME}

    *** Tests ***
    Test
        Do something here

### PlugIn public API

SystemTraceLibrary allow creating extended plugins for trace customer purposes

#### Follow next guide:

##### Create python project 

    plug_in_python_project_folder

##### Create following files inside:

Main init project file for expose Plugin class

    __init__.py
        from .runner import MyPlugInName

        __all__ = [MyPlugInName.__name__]

##### Runner definition

    runner.py
        from SystemTraceLibrary.api import plugins
        from .tables import plugin_table
        from .charts import plugin_chart

        class MyPlugInName(plugins.PlugInAPI):
            # If constractor override required, keep following signature 
            def __init__(self, parameters, data_handler, host_id, **kwargs):
                plugins.PlugInAPI.__init__(self, parameters, data_handler, host_id=host_id, **kwargs)
                self._my_own_var = ...

            @staticmethod
            def affiliated_tables() -> Iterable[model.Table]:
                return my_plugin_table(),

            @staticmethod
            def affiliated_charts() -> Iterable[plugins.ChartAbstract]:
                return MyPlugInChart(),


##### Tables definition

    tables.py
        from SystemTraceLibrary.api import model

        class my_plugin_table(model.TimeReferencedTable / model.Table):
            def __init__(self):
                model.TimeReferencedTable.__init__(self, name='plugin_table',
                                                   fields=[model.Field('field01'),
                                                           model.Field('field02'),
                                                           ...],
                                                   queries=[model.Query('name', 'select * from table_name where field01 = {}')]
                                                   )

        !!! PAY ATTENTION - TimeReferencedTable automatically add fields for reference table entries to time line 
        mechanism 
        In case it not requires, use model.Table base class
##### Parser definition

   parser.py
         from SystemTraceLibrary.api import plugins, model

         class my_parser(plugins.Parser):
            def __call__(*output) -> bool:
                table_template = self.table.template

                Data treatment                

                self.datahandler(model.DataUnit(self.table, your_data: [Iterable[Iterable]]

##### Chart definition

    charts.py
        from SystemTraceLibrary.api.plugins import ChartAbstract

        class MyPlugInChart(ChartAbstract):
            pass

        Creating charts require familirisation with pandas & matplotlib

## Prerequisites
    atop  preinstalled

## Supported OS
    All linux based system where atop supported

## Open issues
 - Add period histogram square or vertical line over system graph for indicate different period's start/stop 
   on same chart instead of create separated charts per period




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/doguz2509/robotframework_system_trace_library",
    "name": "robotframework-system-trace-library",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Dmitry Oguz",
    "author_email": "doguz2509@gmail.com",
    "download_url": "",
    "platform": "",
    "description": "# System Trace Library (Version 1.2.11)\n\n## Overview\nSystemTraceLibrary allow collect system data of target linux host during any Robotframework \ntesting process being running\n\n### Architecture\nMain keyword library executing background python threads for SqlLite db node, separate theads for system trace collecting \nplugins\nBy default library contain 'aTopPlugIn'. 'atop' command being executing with predefined interval & its out put parsed as following:\n#### aTop System Level\nSystem level portion of 'atop' being storing in database, and later can be shown as chart in special html page\nLink to it logged to robotframework regular log\n#### aTop Process Level\nTBD in future releases\n#### PlugIn extension API\nLibrary provide special API for create custom plugins (SystemTraceLibrary.api.[plugins, model])\n\n\n## Installation\n\n    python -m pip install robotframework_system_trace_library\n\n## Usage\n\nLibDoc: [Library documentation](docs/SystemTraceLibrary.html)\n\n### Test/Keywords within *.robot file\n\n    *** Settings ***\n    Library  SystemTraceLibrary \n    ...     [location (Default: logs)] \n    ...     [file_name (Default: system_trace.db)]\n    ...     [cumulative (Default: False)]\n    ...     [custom_plugins (Default: None)]\n\n    Suite Setup  run keywords  create host connection  ${HOST}  ${USER}  ${PASSWORD}  [${PORT} (Default: 22)] \n    ...                 [alias=${SUITE_NAME} (Default: user@host)]\n    ...          AND  start trace plugin  aTopPlugIn  interval=1s\n    Test Setup   Start period  ${TEST_NAME}\n    Test Teardown  run keywords  Stop period   ${TEST_NAME}\n    ...             AND  generate module statistics  ${TEST_NAME}\n    Suite Teardown  Close host connection  alias=${SUITE_NAME}\n\n    *** Tests ***\n    Test\n        Do something here\n\n### PlugIn public API\n\nSystemTraceLibrary allow creating extended plugins for trace customer purposes\n\n#### Follow next guide:\n\n##### Create python project \n\n    plug_in_python_project_folder\n\n##### Create following files inside:\n\nMain init project file for expose Plugin class\n\n    __init__.py\n        from .runner import MyPlugInName\n\n        __all__ = [MyPlugInName.__name__]\n\n##### Runner definition\n\n    runner.py\n        from SystemTraceLibrary.api import plugins\n        from .tables import plugin_table\n        from .charts import plugin_chart\n\n        class MyPlugInName(plugins.PlugInAPI):\n            # If constractor override required, keep following signature \n            def __init__(self, parameters, data_handler, host_id, **kwargs):\n                plugins.PlugInAPI.__init__(self, parameters, data_handler, host_id=host_id, **kwargs)\n                self._my_own_var = ...\n\n            @staticmethod\n            def affiliated_tables() -> Iterable[model.Table]:\n                return my_plugin_table(),\n\n            @staticmethod\n            def affiliated_charts() -> Iterable[plugins.ChartAbstract]:\n                return MyPlugInChart(),\n\n\n##### Tables definition\n\n    tables.py\n        from SystemTraceLibrary.api import model\n\n        class my_plugin_table(model.TimeReferencedTable / model.Table):\n            def __init__(self):\n                model.TimeReferencedTable.__init__(self, name='plugin_table',\n                                                   fields=[model.Field('field01'),\n                                                           model.Field('field02'),\n                                                           ...],\n                                                   queries=[model.Query('name', 'select * from table_name where field01 = {}')]\n                                                   )\n\n        !!! PAY ATTENTION - TimeReferencedTable automatically add fields for reference table entries to time line \n        mechanism \n        In case it not requires, use model.Table base class\n##### Parser definition\n\n   parser.py\n         from SystemTraceLibrary.api import plugins, model\n\n         class my_parser(plugins.Parser):\n            def __call__(*output) -> bool:\n                table_template = self.table.template\n\n                Data treatment                \n\n                self.datahandler(model.DataUnit(self.table, your_data: [Iterable[Iterable]]\n\n##### Chart definition\n\n    charts.py\n        from SystemTraceLibrary.api.plugins import ChartAbstract\n\n        class MyPlugInChart(ChartAbstract):\n            pass\n\n        Creating charts require familirisation with pandas & matplotlib\n\n## Prerequisites\n    atop  preinstalled\n\n## Supported OS\n    All linux based system where atop supported\n\n## Open issues\n - Add period histogram square or vertical line over system graph for indicate different period's start/stop \n   on same chart instead of create separated charts per period\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "RobotFramework extended keyword library; Allow background system tracing; aTop+",
    "version": "1.2.11",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "9e646ef62a7e265f8eac217af8634f76",
                "sha256": "c8f11bace9cbd189d8525ad7c436c9afa57521e5916f29438259a852ee884c37"
            },
            "downloads": -1,
            "filename": "robotframework_system_trace_library-1.2.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e646ef62a7e265f8eac217af8634f76",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 84951,
            "upload_time": "2021-04-08T18:43:01",
            "upload_time_iso_8601": "2021-04-08T18:43:01.370893Z",
            "url": "https://files.pythonhosted.org/packages/14/80/4e96db1515739917260e16da936d5db904e25da73607296116848a68a98f/robotframework_system_trace_library-1.2.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-04-08 18:43:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "doguz2509",
    "error": "Could not fetch GitHub repository",
    "lcname": "robotframework-system-trace-library"
}
        
Elapsed time: 0.24401s