:orphan: .. index:: pair: group; FIO tool .. _doxid-group__tapi__fio: FIO tool ======== .. toctree:: :hidden: group_tapi_fio_fio.rst group_tapi_fio_internal.rst enum_tapi_fio_ioengine.rst enum_tapi_fio_rwtype.rst struct_tapi_fio.rst struct_tapi_fio_app.rst struct_tapi_fio_methods.rst struct_tapi_fio_numjobs_t.rst struct_tapi_fio_opts.rst struct_tapi_fio_report.rst struct_tapi_fio_report_bw.rst struct_tapi_fio_report_clat.rst struct_tapi_fio_report_io.rst struct_tapi_fio_report_iops.rst struct_tapi_fio_report_lat.rst struct_tapi_fio_report_percentiles.rst Overview ~~~~~~~~ Test API to control 'fio' tool. :ref:`More...` | :ref:`Control a FIO tool` | :ref:`FIO tool internals` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef struct :ref:`tapi_fio_report_lat` :ref:`tapi_fio_report_lat`; typedef struct :ref:`tapi_fio_report_bw` :ref:`tapi_fio_report_bw`; typedef struct :ref:`tapi_fio_report_percentiles` :ref:`tapi_fio_report_percentiles`; typedef struct :ref:`tapi_fio_report_clat` :ref:`tapi_fio_report_clat`; typedef struct :ref:`tapi_fio_report_iops` :ref:`tapi_fio_report_iops`; typedef struct :ref:`tapi_fio_report_io` :ref:`tapi_fio_report_io`; typedef struct :ref:`tapi_fio_report` :ref:`tapi_fio_report`; typedef struct :ref:`tapi_fio_numjobs_t` :ref:`tapi_fio_numjobs_t`; typedef struct :ref:`tapi_fio_opts` :ref:`tapi_fio_opts`; typedef struct :ref:`tapi_fio_app` :ref:`tapi_fio_app`; typedef struct :ref:`tapi_fio` :ref:`tapi_fio`; typedef :ref:`te_errno` (*:ref:`tapi_fio_method_start`)(tapi_fio *fio); typedef :ref:`te_errno` (*:ref:`tapi_fio_method_wait`)( tapi_fio *fio, int16_t timeout_sec ); typedef :ref:`te_errno` (*:ref:`tapi_fio_method_stop`)(tapi_fio *fio); typedef :ref:`te_errno` (*:ref:`tapi_fio_method_get_report`)( tapi_fio *fio, tapi_fio_report *report ); typedef struct :ref:`tapi_fio_methods` :ref:`tapi_fio_methods`; // enums enum :ref:`tapi_fio_ioengine`; enum :ref:`tapi_fio_rwtype`; // structs struct :ref:`tapi_fio`; struct :ref:`tapi_fio_app`; struct :ref:`tapi_fio_methods`; struct :ref:`tapi_fio_numjobs_t`; struct :ref:`tapi_fio_opts`; struct :ref:`tapi_fio_report`; struct :ref:`tapi_fio_report_bw`; struct :ref:`tapi_fio_report_clat`; struct :ref:`tapi_fio_report_io`; struct :ref:`tapi_fio_report_iops`; struct :ref:`tapi_fio_report_lat`; struct :ref:`tapi_fio_report_percentiles`; // global functions :ref:`tapi_fio`* :ref:`tapi_fio_create`(const :ref:`tapi_fio_opts`* options, :ref:`tapi_job_factory_t`* factory, const char* path); void :ref:`tapi_fio_destroy`(:ref:`tapi_fio`* fio); void :ref:`tapi_fio_opts_init`(:ref:`tapi_fio_opts`* options); :ref:`te_errno` :ref:`tapi_fio_start`(:ref:`tapi_fio`* fio); :ref:`te_errno` :ref:`tapi_fio_wait`(:ref:`tapi_fio`* fio, int16_t timeout_sec); :ref:`te_errno` :ref:`tapi_fio_stop`(:ref:`tapi_fio`* fio); :ref:`te_errno` :ref:`tapi_fio_get_report`(:ref:`tapi_fio`* fio, :ref:`tapi_fio_report`* report); void :ref:`tapi_fio_log_report`(:ref:`tapi_fio_report`* report); :ref:`te_errno` :ref:`tapi_fio_mi_report`(:ref:`te_mi_logger`* logger, const :ref:`tapi_fio_report`* report); // macros #define :target:`TAPI_FIO_IOENGINE_MAPPING_LIST` #define :ref:`TAPI_FIO_MAX_NUMJOBS` #define :ref:`TAPI_FIO_MAX_REPORT` #define :ref:`TAPI_FIO_OPTS_DEFAULTS` #define :ref:`TAPI_FIO_RWTYPE_MAPPING_LIST` #define :ref:`TAPI_FIO_TIMEOUT_DEFAULT` #define :ref:`TEST_FIO_IOENGINE_PARAM`(var_name_) #define :ref:`TEST_FIO_NUMJOBS_PARAM`(var_name_) #define :ref:`TEST_FIO_RWTYPE_PARAM`(var_name_) #define :ref:`TEST_GET_FIO_IOENGINE_PARAM`(var_name_) #define :ref:`TEST_GET_FIO_NUMJOBS_PARAM`(var_name_) #define :ref:`TEST_GET_FIO_RWTYPE_PARAM`(var_name_) .. _details-group__tapi__fio: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Test API to control 'fio' tool. Typedefs -------- .. index:: pair: typedef; tapi_fio_report_lat .. _doxid-group__tapi__fio_1ga01c0a7f9e4ae47ef9de06679987a221a: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report_lat` tapi_fio_report_lat Latency FIO report .. index:: pair: typedef; tapi_fio_report_bw .. _doxid-group__tapi__fio_1ga2347d80a253c186d5baedfffb040bf4f: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report_bw` tapi_fio_report_bw Bandwidth FIO report .. index:: pair: typedef; tapi_fio_report_percentiles .. _doxid-group__tapi__fio_1ga4b20393e89ae08371fb0e800454c8206: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report_percentiles` tapi_fio_report_percentiles Latency percentiles .. index:: pair: typedef; tapi_fio_report_clat .. _doxid-group__tapi__fio_1ga6aae02acfe583ad9ec6cb31b3323f882: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report_clat` tapi_fio_report_clat Completion latency FIO report .. index:: pair: typedef; tapi_fio_report_iops .. _doxid-group__tapi__fio_1ga2e15afcde0a580eadb36ea2c68eafe91: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report_iops` tapi_fio_report_iops IOPS FIO report .. index:: pair: typedef; tapi_fio_report_io .. _doxid-group__tapi__fio_1ga3d58414a04655d486cee513f67c1ca48: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report_io` tapi_fio_report_io FIO reports .. index:: pair: typedef; tapi_fio_report .. _doxid-group__tapi__fio_1ga62ad2817c24ae5d7ced0152e0b18d512: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_report` tapi_fio_report FIO test tool report. .. index:: pair: typedef; tapi_fio_numjobs_t .. _doxid-group__tapi__fio_1ga0a374bb9b7c3ed3c75f301e6934bb470: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_numjobs_t` tapi_fio_numjobs_t Contain FIO numjobs. numjobs.expr is used to calculate the actual number of jobs if it is not ``NULL``, otherwise numjobs.value is used. .. index:: pair: typedef; tapi_fio_opts .. _doxid-group__tapi__fio_1ga42059257d9f3d697c2110f6c383c70fe: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_opts` tapi_fio_opts List of possible FIO test tool options. .. index:: pair: typedef; tapi_fio_app .. _doxid-group__tapi__fio_1ga2b6eec60111806f19004a24bebb5e10a: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_app` tapi_fio_app FIO tool context. Based on :ref:`tapi_perf_app ` .. index:: pair: typedef; tapi_fio .. _doxid-group__tapi__fio_1ga38a5792ce8706212d322a7a58d269f20: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio` tapi_fio FIO tool context .. index:: pair: typedef; tapi_fio_method_start .. _doxid-group__tapi__fio_1ga68ac4519e3ffefe8ca268e90fc375732: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef :ref:`te_errno` (*tapi_fio_method_start)(tapi_fio *fio) Method to start FIO. Call from :ref:`tapi_fio_start() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. rubric:: See also: :ref:`tapi_fio_start ` .. index:: pair: typedef; tapi_fio_method_wait .. _doxid-group__tapi__fio_1gacbac6472b97afdaa6741aa442c475a1f: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef :ref:`te_errno` (*tapi_fio_method_wait)( tapi_fio *fio, int16_t timeout_sec ) Method wait certain time for FIO to complete. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - timeout_sec - Timeout in seconds * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. * - TE_ETIMEDOUT - If timeout is expired. .. rubric:: Returns: Status code. .. rubric:: See also: :ref:`tapi_fio_wait ` .. index:: pair: typedef; tapi_fio_method_stop .. _doxid-group__tapi__fio_1gafb171cd382fc908b0fc04528d90a8e9d: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef :ref:`te_errno` (*tapi_fio_method_stop)(tapi_fio *fio) Method for stop FIO. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. rubric:: See also: :ref:`tapi_fio_stop ` .. index:: pair: typedef; tapi_fio_method_get_report .. _doxid-group__tapi__fio_1ga52ee89da738ecc2bfb9378fdf5083ed1: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef :ref:`te_errno` (*tapi_fio_method_get_report)( tapi_fio *fio, tapi_fio_report *report ) Generate report from fio output. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - report - FIO test tool report * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. rubric:: See also: :ref:`tapi_fio_get_report ` .. index:: pair: typedef; tapi_fio_methods .. _doxid-group__tapi__fio_1ga3f5693bd46c928e3d092d5d043135364: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_fio_methods` tapi_fio_methods Methods to operate FIO test tool. Global Functions ---------------- .. index:: pair: function; tapi_fio_create .. _doxid-group__tapi__fio_1ga61d11dc640958317527be29d4f847515: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_fio`* tapi_fio_create(const :ref:`tapi_fio_opts`* options, :ref:`tapi_job_factory_t`* factory, const char* path) Create FIO context based on options. Never return NULL, test failed if error. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - options - FIO options * - factory - Job factory * - path - Path to fio tool. May be NULL if no special path desired. .. rubric:: Returns: Initialization created fio. .. rubric:: See also: :ref:`tapi_fio_destroy ` .. index:: pair: function; tapi_fio_destroy .. _doxid-group__tapi__fio_1ga7c83ee9517b872abe5f14ab13e6c8154: .. ref-code-block:: cpp :class: doxyrest-title-code-block void tapi_fio_destroy(:ref:`tapi_fio`* fio) Destroy FIO context. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - what destroy .. rubric:: See also: :ref:`tapi_fio_create ` .. index:: pair: function; tapi_fio_opts_init .. _doxid-group__tapi__fio_1ga15adeb351a87fd5d02227aadaf185cd1: .. ref-code-block:: cpp :class: doxyrest-title-code-block void tapi_fio_opts_init(:ref:`tapi_fio_opts`* options) Initialize default value. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - options - fio options .. index:: pair: function; tapi_fio_start .. _doxid-group__tapi__fio_1gaf80550dd2210a386f57e869af6c12314: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_fio_start(:ref:`tapi_fio`* fio) Start FIO. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_fio_wait .. _doxid-group__tapi__fio_1ga69cad064d7086b19b6235f8ccde45af0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_fio_wait(:ref:`tapi_fio`* fio, int16_t timeout_sec) Wait certain time for FIO to complete. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - timeout_sec - Timeout in seconds * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_fio_stop .. _doxid-group__tapi__fio_1gadcd9520d1bba57a77d0a8badcee18fd9: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_fio_stop(:ref:`tapi_fio`* fio) Kill FIO execution. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_fio_get_report .. _doxid-group__tapi__fio_1gac182e06a5a92083022591a11a58bd589: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_fio_get_report(:ref:`tapi_fio`* fio, :ref:`tapi_fio_report`* report) Dump report in TE log .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - fio - FIO context * - report - FIO report structure * - 0 - No errors. * - TE_EOPNOTSUPP - If FIO control structure not valid. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_fio_log_report .. _doxid-group__tapi__fio_1ga5cc5bf1bf6623fd57a14209f435314a0: .. ref-code-block:: cpp :class: doxyrest-title-code-block void tapi_fio_log_report(:ref:`tapi_fio_report`* report) Log report to TE log .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - report - report to log .. index:: pair: function; tapi_fio_mi_report .. _doxid-group__tapi__fio_1ga7ccc65b9460d23b8614e25edea033845: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_fio_mi_report(:ref:`te_mi_logger`* logger, const :ref:`tapi_fio_report`* report) Add FIO report to MI logger .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - logger - MI logger * - report - FIO report structure .. rubric:: Returns: Status code Macros ------ .. index:: pair: define; TAPI_FIO_MAX_NUMJOBS .. _doxid-group__tapi__fio_1ga8e699c3ae1a2c4e30bd38404740fa9d7: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TAPI_FIO_MAX_NUMJOBS The maximum value of numjobs, used to estimate the timeout .. index:: pair: define; TAPI_FIO_MAX_REPORT .. _doxid-group__tapi__fio_1ga4dfb00e58ea0a27013a23fd6985a8afe: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TAPI_FIO_MAX_REPORT FIO report max size .. index:: pair: define; TAPI_FIO_OPTS_DEFAULTS .. _doxid-group__tapi__fio_1gaa14ca607e63f223285b48a1bbc6e50db: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TAPI_FIO_OPTS_DEFAULTS Macro to initialize default value. .. index:: pair: define; TAPI_FIO_RWTYPE_MAPPING_LIST .. _doxid-group__tapi__fio_1gabf031fdd166c78a75f43b6885d77cec9: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TAPI_FIO_RWTYPE_MAPPING_LIST List of values allowed for parameter of type 'tapi_fio_rwtype'. .. index:: pair: define; TAPI_FIO_TIMEOUT_DEFAULT .. _doxid-group__tapi__fio_1ga23cba0207c57f9525ca117434196c7d5: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TAPI_FIO_TIMEOUT_DEFAULT Estimate timeout from input FIO parameters .. index:: pair: define; TEST_FIO_IOENGINE_PARAM .. _doxid-group__tapi__fio_1gae5add1983db40a7dfebe52b16beb373b: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_FIO_IOENGINE_PARAM(var_name_) Get the value of parameter of type 'tapi_fio_ioengine' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the parameter .. rubric:: Returns: value of parameter of type 'tapi_fio_ioengine' .. index:: pair: define; TEST_FIO_NUMJOBS_PARAM .. _doxid-group__tapi__fio_1ga4d45505628f5251c4d28bd8d63b5b7c6: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_FIO_NUMJOBS_PARAM(var_name_) The syntax of the parameter is an expression accepted by :ref:`tapi_cfg_cpu_calculate_numjobs() `. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the parameter .. rubric:: Returns: value of parameter of type ' :ref:`tapi_fio_numjobs_t ` ' .. index:: pair: define; TEST_FIO_RWTYPE_PARAM .. _doxid-group__tapi__fio_1gab2592fd0fb7e2e0a5411c4c1ac1f20fe: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_FIO_RWTYPE_PARAM(var_name_) Get the value of parameter of type 'tapi_fio_rwtype' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the parameter .. rubric:: Returns: value of parameter of type 'tapi_fio_rwtype' .. index:: pair: define; TEST_GET_FIO_IOENGINE_PARAM .. _doxid-group__tapi__fio_1gaa6a7ab5579a2af936883917d21a994ab: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_FIO_IOENGINE_PARAM(var_name_) Get test parameter ioengine .. rubric:: See also: :ref:`TEST_FIO_IOENGINE_PARAM ` .. index:: pair: define; TEST_GET_FIO_NUMJOBS_PARAM .. _doxid-group__tapi__fio_1gab3584935aed6e5622d89499114c3ef7b: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_FIO_NUMJOBS_PARAM(var_name_) Get test parameter numjobs .. rubric:: See also: :ref:`TEST_FIO_NUMJOBS_PARAM ` .. index:: pair: define; TEST_GET_FIO_RWTYPE_PARAM .. _doxid-group__tapi__fio_1gafbb1e538d4d87e55d46b89036be71cf4: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_FIO_RWTYPE_PARAM(var_name_) Get test parameter rwtype .. rubric:: See also: :ref:`TEST_FIO_RWTYPE_PARAM `