Workload types
Functions
wl_type_register
public
Register TSLoad workload type (called in mod_config)
ARGUMENTS
-
mod - module descriptor
-
wlt - workload type descriptor
LIBEXPORT int wl_type_register(module_t* mod, wl_type_t* wlt)
wl_type_unregister
public
Unregister TSLoad workload type (called in mod_unconfig)
ARGUMENTS
-
mod - module descriptor
-
wlt - workload type descriptor
LIBEXPORT int wl_type_unregister(module_t* mod, wl_type_t* wlt)
wlt_init, wlt_fini
public
LIBEXPORT int wlt_init(void) LIBEXPORT void wlt_fini(void)
Types
typedef enum wl_class
Workload classes
typedef enum wl_class { WLC_CPU_INTEGER = 0x0001, WLC_CPU_FLOAT = 0x0002, WLC_CPU_MEMORY = 0x0004, WLC_CPU_MISC = 0x0008, WLC_MEMORY_ALLOCATION = 0x0010, WLC_FILESYSTEM_OP = 0x0100, WLC_FILESYSTEM_RW = 0x0200, WLC_DISK_RW = 0x0400, WLC_NETWORK = 0x1000, WLC_OS_BENCHMARK = 0x10000, WLC_NET_CLIENT = 0x100000 } wl_class_t;
typedef struct wl_type
Workload type descriptor
Set up it statically in your module
MEMBERS
-
wlt_name - Name of workload type (use AAS_CONST_STR for it)
-
wlt_class - Bitmask of workload class flags
-
wlt_description - Description of a workload type
-
wlt_params - pointer to a vector of workload/request parameter descriptors
-
wlt_params_size - sizeof() of workload parameters structure
-
wlt_rqparams_size - sizeof() of request parameters structure
-
wlt_wl_config - pointer to function that configures workload
-
wlt_wl_unconfig - pointer to function that destroyes worklaod
-
wlt_wl_step - function that will be called at beginning of each step
-
wlt_run_request - primary workload function that services request
-
wlt_module - should be set to module structure passed to mod_config()
-
wlt_next - field internally used by TSLoad, set to NULL
typedef struct wl_type { AUTOSTRING char* wlt_name; wl_class_t wlt_class; const char* wlt_description; wlp_descr_t* wlt_params; size_t wlt_params_size; size_t wlt_rqparams_size; wlt_wl_config_func wlt_wl_config; wlt_wl_config_func wlt_wl_unconfig; wlt_wl_step_func wlt_wl_step; wlt_run_request_func wlt_run_request; module_t* wlt_module; struct wl_type* wlt_next; } wl_type_t;