tool functions TAPI
Overview
TAPI to handle stress tool. More…
// typedefs typedef struct tapi_stress_opt tapi_stress_opt; // structs struct tapi_stress_opt; // global variables static const tapi_stress_opt tapi_stress_default_opt = { .cpu = TAPI_JOB_OPT_OMIT_UINT, .io = TAPI_JOB_OPT_OMIT_UINT, .vm = TAPI_JOB_OPT_OMIT_UINT, .timeout_s = TAPI_JOB_OPT_OMIT_UINT, }; // global functions te_errno tapi_stress_create(tapi_job_factory_t* factory, const tapi_stress_opt* opt, struct tapi_stress_app** app); te_errno tapi_stress_start(struct tapi_stress_app* app); te_errno tapi_stress_stop(struct tapi_stress_app* app, int timeout_ms); void tapi_stress_destroy(struct tapi_stress_app* app); // macros #define TAPI_STRESS_DEFAULT_TERM_TIMEOUT_MS
Detailed Documentation
TAPI to handle stress tool.
Copyright (C) 2020-2022 OKTET Labs Ltd. All rights reserved.
Typedefs
typedef struct tapi_stress_opt tapi_stress_opt
stress tool specific command line options. At least one of the stress targets (CPU, IO, VM) should be specified (by setting a value other than TAPI_JOB_OPT_OMIT_UINT).
Global Variables
static const tapi_stress_opt tapi_stress_default_opt = { .cpu = TAPI_JOB_OPT_OMIT_UINT, .io = TAPI_JOB_OPT_OMIT_UINT, .vm = TAPI_JOB_OPT_OMIT_UINT, .timeout_s = TAPI_JOB_OPT_OMIT_UINT, }
Default options initializer
Global Functions
te_errno tapi_stress_create(tapi_job_factory_t* factory, const tapi_stress_opt* opt, struct tapi_stress_app** app)
Create stress app. All needed information to run stress is in opt
Parameters:
factory |
Job factory. |
opt |
Options of stress tool. |
app |
stress app handle. |
Returns:
Status code.
te_errno tapi_stress_start(struct tapi_stress_app* app)
Start stress app.
Parameters:
app |
stress app handle. |
Returns:
Status code.
te_errno tapi_stress_stop(struct tapi_stress_app* app, int timeout_ms)
Stop stress app.
Parameters:
app |
stress app handle. |
timeout_ms |
Wait timeout in milliseconds. |
Returns:
Status code.
void tapi_stress_destroy(struct tapi_stress_app* app)
Destroy stress app.
Parameters:
app |
stress app handle. |