DPDK statistics helper functions TAPI
Overview
TAPI to handle DPDK-related operations with statistics
Copyright (C) 2019-2022 OKTET Labs Ltd. More…
// global functions void tapi_dpdk_stats_pps_artifact(te_mi_logger* logger, int64_t pps, const char* prefix); uint64_t tapi_dpdk_stats_calculate_l1_bitrate(uint64_t pps, unsigned int packet_size); te_errno tapi_dpdk_stats_calculate_l1_link_usage(uint64_t l1_bitrate, unsigned int link_speed, double* l1_link_usage); void tapi_dpdk_stats_l1_bitrate_artifact(te_mi_logger* logger, uint64_t l1_bitrate, const char* prefix); void tapi_dpdk_stats_l1_link_usage_artifact(te_mi_logger* logger, double l1_link_usage, const char* prefix); void tapi_dpdk_stats_cv_artifact(te_mi_logger* logger, double cv, const char* prefix); te_errno tapi_dpdk_stats_summary_artifact(const te_meas_stats_t* meas_stats, const char* prefix); void tapi_dpdk_stats_stab_artifact(te_mi_logger* logger, const te_meas_stats_t* meas_stats, const char* prefix); te_errno tapi_dpdk_stats_log_rates(const char* tool, const te_meas_stats_t* meas_stats, unsigned int packet_size, unsigned int link_speed, const char* prefix); // macros #define TAPI_DPDK_STATS_GATHERED_RING(title, N, fmt_str, ...)
Detailed Documentation
TAPI to handle DPDK-related operations with statistics
Copyright (C) 2019-2022 OKTET Labs Ltd. All rights reserved.
Global Functions
void tapi_dpdk_stats_pps_artifact(te_mi_logger* logger, int64_t pps, const char* prefix)
Report packet per second statistics as a test artifact.
Parameters:
logger |
MI logger entity to add artifact into (may be |
pps |
Packets per second |
prefix |
Prefix of the artifact message (may be |
Returns:
Status code
uint64_t tapi_dpdk_stats_calculate_l1_bitrate(uint64_t pps, unsigned int packet_size)
Calculate layer 1 bits per second from PPS and packet size.
Parameters:
pps |
Packets per second |
packet_size |
Packet size in bytes (without l1 and FCS) |
Returns:
Layer 1 bits per second
te_errno tapi_dpdk_stats_calculate_l1_link_usage(uint64_t l1_bitrate, unsigned int link_speed, double* l1_link_usage)
Calculate layer 1 link usage from layer 1 bitrate and link speed.
Parameters:
l1_bitrate |
Layer 1 bits per second |
link_speed |
Link speed in Mbps |
l1_link_usage |
Layer 1 link usage ratio |
Returns:
Status code
void tapi_dpdk_stats_l1_bitrate_artifact(te_mi_logger* logger, uint64_t l1_bitrate, const char* prefix)
Report packet per second statistics as a test artifact.
Parameters:
logger |
MI logger entity to add artifact into (may be |
l1_bitrate |
Layer 1 bits per second |
prefix |
Prefix of the artifact message (may be |
Returns:
Status code
void tapi_dpdk_stats_l1_link_usage_artifact(te_mi_logger* logger, double l1_link_usage, const char* prefix)
Report layer 1 link usage statistics as a test artifact.
Parameters:
logger |
MI logger entity to add artifact into (may be |
l1_link_usage |
Layer 1 link usage ratio |
prefix |
Prefix of the artifact message (may be |
Returns:
Status code
void tapi_dpdk_stats_cv_artifact(te_mi_logger* logger, double cv, const char* prefix)
Report CV of packer per second statistics as a test artifact
Parameters:
logger |
MI logger entity to add artifact into (may be |
cv |
Coefficient of variation |
prefix |
Prefix of the artifact message (may be |
Returns:
Status code
te_errno tapi_dpdk_stats_summary_artifact(const te_meas_stats_t* meas_stats, const char* prefix)
Report statistics provided by te_meas_stats_summary_t.
Parameters:
meas_stats |
Pointer to te_meas_stats_t structure |
prefix |
Prefix of the artifact message (may be |
Returns:
0 on success
void tapi_dpdk_stats_stab_artifact(te_mi_logger* logger, const te_meas_stats_t* meas_stats, const char* prefix)
Report statistics provided by te_meas_stats_stab_t.
Parameters:
logger |
MI logger entity to add artifact into (may be |
meas_stats |
Pointer to te_meas_stats_t structure |
prefix |
Prefix of the artifact message (may be |
te_errno tapi_dpdk_stats_log_rates(const char* tool, const te_meas_stats_t* meas_stats, unsigned int packet_size, unsigned int link_speed, const char* prefix)
Report rates corresponding to PPS, packet_size and link speed as test artifacts.
Parameters:
tool |
Tool used for measurement gathering (must not be |
meas_stats |
Pointer to te_meas_stats_t structure |
packet_size |
Packet size in bytes (without l1 and FCS) |
link_speed |
Link speed in Mbps |
prefix |
Prefix of artifact messages (may be |
Returns:
0 on success