TAPI to manage memaslap

Overview

TAPI to manage memaslap. More…

// typedefs

typedef struct tapi_memaslap_app tapi_memaslap_app;
typedef struct tapi_memaslap_report tapi_memaslap_report;
typedef struct tapi_memaslap_cfg_opt tapi_memaslap_cfg_opt;
typedef struct tapi_memaslap_opt tapi_memaslap_opt;

// structs

struct tapi_memaslap_app;
struct tapi_memaslap_cfg_opt;
struct tapi_memaslap_opt;
struct tapi_memaslap_report;

// global variables

const tapi_memaslap_opt tapi_memaslap_default_opt;
const tapi_memaslap_cfg_opt tapi_memaslap_default_cfg_opt;

// global functions

te_errno tapi_memaslap_create(tapi_job_factory_t* factory, tapi_memaslap_opt* opt, tapi_memaslap_app** app);
te_errno tapi_memaslap_start(const tapi_memaslap_app* app);
te_errno tapi_memaslap_wait(const tapi_memaslap_app* app, int timeout_ms);
te_errno tapi_memaslap_stop(const tapi_memaslap_app* app);
te_errno tapi_memaslap_kill(const tapi_memaslap_app* app, int signum);
te_errno tapi_memaslap_destroy(tapi_memaslap_app* app);
te_errno tapi_memaslap_get_report(tapi_memaslap_app* app, tapi_memaslap_report* report);
te_errno tapi_memaslap_report_mi_log(const tapi_memaslap_report* report);
te_errno tapi_memaslap_destroy_report(tapi_memaslap_report* report);

// macros

#define TAPI_MEMASLAP_SERVERS_MAX

Detailed Documentation

TAPI to manage memaslap.

Copyright (C) 2022-2022 OKTET Labs Ltd. All rights reserved.

Typedefs

typedef struct tapi_memaslap_app tapi_memaslap_app

memaslap tool information.

typedef struct tapi_memaslap_report tapi_memaslap_report

memaslap information from the stdout.

typedef struct tapi_memaslap_cfg_opt tapi_memaslap_cfg_opt

Contents of memaslap configuration file.

typedef struct tapi_memaslap_opt tapi_memaslap_opt

memaslap specific options.

Global Variables

const tapi_memaslap_opt tapi_memaslap_default_opt

Default memaslap options initializer.

const tapi_memaslap_cfg_opt tapi_memaslap_default_cfg_opt

Default memaslap configuration file options initializer.

Global Functions

te_errno tapi_memaslap_create(tapi_job_factory_t* factory, tapi_memaslap_opt* opt, tapi_memaslap_app** app)

Create memaslap app.

Parameters:

factory

Job factory.

opt

memaslap options.

app

memaslap app handle.

Returns:

Status code.

te_errno tapi_memaslap_start(const tapi_memaslap_app* app)

Start memaslap.

Parameters:

app

memaslap app handle.

Returns:

Status code.

te_errno tapi_memaslap_wait(const tapi_memaslap_app* app, int timeout_ms)

Wait for memaslap completion.

Parameters:

app

memaslap app handle.

timeout_ms

Wait timeout in milliseconds.

Returns:

Status code.

te_errno tapi_memaslap_stop(const tapi_memaslap_app* app)

Stop memaslap. It can be started over with tapi_memaslap_start().

Parameters:

app

memaslap app handle.

Returns:

Status code.

te_errno tapi_memaslap_kill(const tapi_memaslap_app* app, int signum)

Send a signal to memaslap.

Parameters:

app

memaslap app handle.

signum

Signal to send.

Returns:

Status code.

te_errno tapi_memaslap_destroy(tapi_memaslap_app* app)

Destroy memaslap.

Parameters:

app

memaslap app handle.

Returns:

Status code.

te_errno tapi_memaslap_get_report(tapi_memaslap_app* app, tapi_memaslap_report* report)

Get memaslap report.

Field ‘arguments’ in the report is freed in extern te_errno tapi_memaslap_destroy_report(…).

Parameters:

app

memaslap app handle.

report

memaslap statistics report.

Returns:

Status code.

te_errno tapi_memaslap_report_mi_log(const tapi_memaslap_report* report)

Add memaslap report to MI logger.

Parameters:

report

memaslap statistics report.

Returns:

Status code.

te_errno tapi_memaslap_destroy_report(tapi_memaslap_report* report)

Destroy memaslap report to MI logger and freed memory.

Field ‘arguments’ in the report is freed here.

Parameters:

report

memaslap statistics report.

Returns:

Status code.

Macros

#define TAPI_MEMASLAP_SERVERS_MAX

Maximum number of servers that can be set in memaslap options