:orphan: .. index:: pair: group; TAPI to manage memaslap .. _doxid-group__tapi__memaslap: TAPI to manage memaslap ======================= .. toctree:: :hidden: struct_tapi_memaslap_app.rst struct_tapi_memaslap_cfg_opt.rst struct_tapi_memaslap_opt.rst struct_tapi_memaslap_report.rst Overview ~~~~~~~~ TAPI to manage *memaslap*. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef struct :ref:`tapi_memaslap_app` :ref:`tapi_memaslap_app`; typedef struct :ref:`tapi_memaslap_report` :ref:`tapi_memaslap_report`; typedef struct :ref:`tapi_memaslap_cfg_opt` :ref:`tapi_memaslap_cfg_opt`; typedef struct :ref:`tapi_memaslap_opt` :ref:`tapi_memaslap_opt`; // structs struct :ref:`tapi_memaslap_app`; struct :ref:`tapi_memaslap_cfg_opt`; struct :ref:`tapi_memaslap_opt`; struct :ref:`tapi_memaslap_report`; // global variables const :ref:`tapi_memaslap_opt` :ref:`tapi_memaslap_default_opt`; const :ref:`tapi_memaslap_cfg_opt` :ref:`tapi_memaslap_default_cfg_opt`; // global functions :ref:`te_errno` :ref:`tapi_memaslap_create`(:ref:`tapi_job_factory_t`* factory, :ref:`tapi_memaslap_opt`* opt, :ref:`tapi_memaslap_app`** app); :ref:`te_errno` :ref:`tapi_memaslap_start`(const :ref:`tapi_memaslap_app`* app); :ref:`te_errno` :ref:`tapi_memaslap_wait`(const :ref:`tapi_memaslap_app`* app, int timeout_ms); :ref:`te_errno` :ref:`tapi_memaslap_stop`(const :ref:`tapi_memaslap_app`* app); :ref:`te_errno` :ref:`tapi_memaslap_kill`(const :ref:`tapi_memaslap_app`* app, int signum); :ref:`te_errno` :ref:`tapi_memaslap_destroy`(:ref:`tapi_memaslap_app`* app); :ref:`te_errno` :ref:`tapi_memaslap_get_report`(:ref:`tapi_memaslap_app`* app, :ref:`tapi_memaslap_report`* report); :ref:`te_errno` :ref:`tapi_memaslap_report_mi_log`(const :ref:`tapi_memaslap_report`* report); :ref:`te_errno` :ref:`tapi_memaslap_destroy_report`(:ref:`tapi_memaslap_report`* report); // macros #define :ref:`TAPI_MEMASLAP_SERVERS_MAX` .. _details-group__tapi__memaslap: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ TAPI to manage *memaslap*. Copyright (C) 2022-2022 OKTET Labs Ltd. All rights reserved. Typedefs -------- .. index:: pair: typedef; tapi_memaslap_app .. _doxid-group__tapi__memaslap_1ga7e784b69d35418a75ad57b149c3c100e: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_memaslap_app` tapi_memaslap_app memaslap tool information. .. index:: pair: typedef; tapi_memaslap_report .. _doxid-group__tapi__memaslap_1ga3dc1bf0d2adcabcfdd2dbbe23354d0ff: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_memaslap_report` tapi_memaslap_report memaslap information from the stdout. .. index:: pair: typedef; tapi_memaslap_cfg_opt .. _doxid-group__tapi__memaslap_1gac269f107a3c77ff027456b44fc51186c: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_memaslap_cfg_opt` tapi_memaslap_cfg_opt Contents of memaslap configuration file. .. index:: pair: typedef; tapi_memaslap_opt .. _doxid-group__tapi__memaslap_1ga9fe52e9379a992f4762d92039450b7f2: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_memaslap_opt` tapi_memaslap_opt memaslap specific options. Global Variables ---------------- .. index:: pair: variable; tapi_memaslap_default_opt .. _doxid-group__tapi__memaslap_1ga34d974a84b5058f8895062297ac2c1cf: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`tapi_memaslap_opt` tapi_memaslap_default_opt Default memaslap options initializer. .. index:: pair: variable; tapi_memaslap_default_cfg_opt .. _doxid-group__tapi__memaslap_1ga4638fb374a22fa7ab8d70933ff7a079b: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`tapi_memaslap_cfg_opt` tapi_memaslap_default_cfg_opt Default memaslap configuration file options initializer. Global Functions ---------------- .. index:: pair: function; tapi_memaslap_create .. _doxid-group__tapi__memaslap_1ga5c53edeccf1b1aaf8a62a3923a2b4fe9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_create(:ref:`tapi_job_factory_t`* factory, :ref:`tapi_memaslap_opt`* opt, :ref:`tapi_memaslap_app`** app) Create memaslap app. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - factory - Job factory. * - opt - memaslap options. * - app - memaslap app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_start .. _doxid-group__tapi__memaslap_1ga2a365d32f942b902e0898dbdfed207ca: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_start(const :ref:`tapi_memaslap_app`* app) Start memaslap. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - memaslap app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_wait .. _doxid-group__tapi__memaslap_1ga1e6d3601c50c40c891da2393aea9e604: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_wait(const :ref:`tapi_memaslap_app`* app, int timeout_ms) Wait for memaslap completion. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - memaslap app handle. * - timeout_ms - Wait timeout in milliseconds. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_stop .. _doxid-group__tapi__memaslap_1gae9f9cf560af68f4cc283f7e890f6e72c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_stop(const :ref:`tapi_memaslap_app`* app) Stop memaslap. It can be started over with :ref:`tapi_memaslap_start() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - memaslap app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_kill .. _doxid-group__tapi__memaslap_1gac04dc6344c5230fad565df7d23898cc1: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_kill(const :ref:`tapi_memaslap_app`* app, int signum) Send a signal to memaslap. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - memaslap app handle. * - signum - Signal to send. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_destroy .. _doxid-group__tapi__memaslap_1ga7af0768aaa873cf391afa894f28f4c50: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_destroy(:ref:`tapi_memaslap_app`* app) Destroy memaslap. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - memaslap app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_get_report .. _doxid-group__tapi__memaslap_1ga101764dbfada1eedbb6afbcc93712770: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_get_report(:ref:`tapi_memaslap_app`* app, :ref:`tapi_memaslap_report`* report) Get memaslap report. Field 'arguments' in the ``report`` is freed in extern te_errno tapi_memaslap_destroy_report(...). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - memaslap app handle. * - report - memaslap statistics report. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_report_mi_log .. _doxid-group__tapi__memaslap_1ga582dd805baaab1ea7a6c6af5be2fa26e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_report_mi_log(const :ref:`tapi_memaslap_report`* report) Add memaslap report to MI logger. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - report - memaslap statistics report. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_memaslap_destroy_report .. _doxid-group__tapi__memaslap_1gac41c910d45cc87b8a2e7132c95572d2d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_memaslap_destroy_report(:ref:`tapi_memaslap_report`* report) Destroy memaslap report to MI logger and freed memory. Field 'arguments' in the ``report`` is freed here. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - report - memaslap statistics report. .. rubric:: Returns: Status code. Macros ------ .. index:: pair: define; TAPI_MEMASLAP_SERVERS_MAX .. _doxid-group__tapi__memaslap_1gaa2c805c55718f1b97d27dc60366b1eb6: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TAPI_MEMASLAP_SERVERS_MAX Maximum number of servers that can be set in memaslap options