CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
statistics.h File Reference

The declarations in this header file correspond to the definitions in statistics.c. More...

#include "configuration.h"
#include "cdi_core_api.h"
#include "private.h"

Go to the source code of this file.

Typedefs

typedef struct StatisticsStateStatisticsHandle
 Type used as the handle (pointer to an opaque structure) for managing statistics for a connection. Each handle represents a single data flow.
 

Functions

CdiReturnStatus StatsCreate (CdiConnectionState *con_state_ptr, CdiCoreStatsCallback stats_cb_ptr, CdiUserCbParameter stats_user_cb_param, CloudWatchSdkMetricsHandle cw_sdk_handle, CloudWatchSdkMetricsHandle metrics_gatherer_sdk_handle, StatisticsHandle *return_handle_ptr)
 
CdiReturnStatus StatsDestroy (StatisticsHandle handle)
 
CdiReturnStatus StatsConfigure (StatisticsHandle handle, const CdiStatsConfigData *stats_config_ptr)
 
void StatsGatherPayloadStatsFromConnection (CdiEndpointState *endpoint_ptr, bool payload_ok, uint64_t start_time, uint64_t max_latency_microsecs, uint64_t bytes_transferred)
 

Detailed Description

The declarations in this header file correspond to the definitions in statistics.c.

Function Documentation

◆ StatsConfigure()

CdiReturnStatus StatsConfigure ( StatisticsHandle handle,
const CdiStatsConfigData * stats_config_ptr )

Configure transfer statistics.

Parameters
handleThe handle of the connection to set statistics configuration.
stats_config_ptrPointer to statistics configuration data.
Returns
A value from the CdiReturnStatus enumeration.

◆ StatsCreate()

CdiReturnStatus StatsCreate ( CdiConnectionState * con_state_ptr,
CdiCoreStatsCallback stats_cb_ptr,
CdiUserCbParameter stats_user_cb_param,
CloudWatchSdkMetricsHandle cw_sdk_handle,
CloudWatchSdkMetricsHandle metrics_gatherer_sdk_handle,
StatisticsHandle * return_handle_ptr )

Create an instance of the statistics component for the specified connection.

Parameters
con_state_ptrPointer to connection state data.
stats_cb_ptrAddress of user-defined callback function.
stats_user_cb_paramParameter used in structure passed to stats_cb_ptr.
cw_sdk_handleHandle to CloudWatch Metrics instance.
metrics_gatherer_sdk_handleHandle to CDI metrics gatherer instance.
return_handle_ptrAddress where to write returned statistics handle.
Returns
A value from the CdiReturnStatus enumeration.

◆ StatsDestroy()

CdiReturnStatus StatsDestroy ( StatisticsHandle handle)

Free all resources related to the specified statistics component.

Parameters
handleHandle of statistics component.
Returns
A value from the CdiReturnStatus enumeration.

◆ StatsGatherPayloadStatsFromConnection()

void StatsGatherPayloadStatsFromConnection ( CdiEndpointState * endpoint_ptr,
bool payload_ok,
uint64_t start_time,
uint64_t max_latency_microsecs,
uint64_t bytes_transferred )

Gather transfer time statistics for a single payload from a connection.

Parameters
endpoint_ptrPointer to endpoint state data.
payload_okUse true if payload was successfully transferred, otherwise false.
start_timeTime when transfer for the payload started in microseconds.
max_latency_microsecsThe specified maximum latency in microseconds of the payload.
bytes_transferredThe number of bytes transferred for this connection.