Grid Community Toolkit  6.2.1629922860 (tag: v6.2.20210826)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions
Throughput Performance Plugin

Throughput Performance Plugin. More...

Macros

#define GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_MODULE   (&globus_i_ftp_client_throughput_plugin_module)
 

Typedefs

typedef void(* globus_ftp_client_throughput_plugin_begin_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, const char *source_url, const char *dest_url)
 
typedef void(* globus_ftp_client_throughput_plugin_stripe_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, int stripe_ndx, globus_off_t bytes, float instantaneous_throughput, float avg_throughput)
 
typedef void(* globus_ftp_client_throughput_plugin_total_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, globus_off_t bytes, float instantaneous_throughput, float avg_throughput)
 
typedef void(* globus_ftp_client_throughput_plugin_complete_cb_t )(void *user_specific, globus_ftp_client_handle_t *handle, globus_bool_t success)
 
typedef void *(* globus_ftp_client_throughput_plugin_user_copy_cb_t )(void *user_specific)
 
typedef void(* globus_ftp_client_throughput_plugin_user_destroy_cb_t )(void *user_specific)
 

Functions

globus_result_t globus_ftp_client_throughput_plugin_init (globus_ftp_client_plugin_t *plugin, globus_ftp_client_throughput_plugin_begin_cb_t begin_cb, globus_ftp_client_throughput_plugin_stripe_cb_t per_stripe_cb, globus_ftp_client_throughput_plugin_total_cb_t total_cb, globus_ftp_client_throughput_plugin_complete_cb_t complete_cb, void *user_specific)
 
globus_result_t globus_ftp_client_throughput_plugin_set_copy_destroy (globus_ftp_client_plugin_t *plugin, globus_ftp_client_throughput_plugin_user_copy_cb_t copy_cb, globus_ftp_client_throughput_plugin_user_destroy_cb_t destroy_cb)
 
globus_result_t globus_ftp_client_throughput_plugin_destroy (globus_ftp_client_plugin_t *plugin)
 
globus_result_t globus_ftp_client_throughput_plugin_get_user_specific (globus_ftp_client_plugin_t *plugin, void **user_specific)
 

Detailed Description

Throughput Performance Plugin.

The FTP Throughput Performance plugin allows the user to obtain calculated performance information for all types of transfers except a third party transfer in which Extended Block mode is not enabled.

Note: Since this plugin is built on top of the Performance Marker Plugin, it is not possible to associate both plugins with a handle

Macro Definition Documentation

#define GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_MODULE   (&globus_i_ftp_client_throughput_plugin_module)

Module descriptor

Typedef Documentation

typedef void(* globus_ftp_client_throughput_plugin_begin_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, const char *source_url, const char *dest_url)

Transfer begin callback

This callback will be called when a transfer begins

Parameters
handleThe client handle associated with this transfer
user_specificUser argument passed to globus_ftp_client_throughput_plugin_init
source_urlsource of the transfer (GLOBUS_NULL if 'put')
dest_urldest of the transfer (GLOBUS_NULL if 'get')
Returns
  • n/a
typedef void(* globus_ftp_client_throughput_plugin_complete_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, globus_bool_t success)

Transfer complete callback

This callback will be called upon transfer completion (successful or otherwise)

Parameters
handleThe client handle associated with this transfer
user_specificUser argument passed to globus_ftp_client_throughput_plugin_init
successindicates whether this transfer completed successfully or was interrupted (by error or abort)
Returns
  • n/a
typedef void(* globus_ftp_client_throughput_plugin_stripe_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, int stripe_ndx, globus_off_t bytes, float instantaneous_throughput, float avg_throughput)

Stripe performance throughput callback

This callback will be called with every performance callback that is received by the perf plugin. The first callback for each stripe_ndx will have an instantaneous_throughput based from the time the command was sent.

Parameters
handleThe client handle associated with this transfer
user_specificUser argument passed to globus_ftp_client_throughput_plugin_init
bytesThe total number of bytes received on this stripe
instantaneous_throughputInstanteous throughput on this stripe (bytes / sec)
avg_throughputAverage throughput on this stripe (bytes / sec)
stripe_ndxThis stripe's index
typedef void(* globus_ftp_client_throughput_plugin_total_cb_t)(void *user_specific, globus_ftp_client_handle_t *handle, globus_off_t bytes, float instantaneous_throughput, float avg_throughput)

Total performance throughput callback

This callback will be called with every performance callback that is received by the perf plugin. The first callback for will have an instantaneous_throughput based from the time the command was sent. This callback will be called after the per_stripe_cb

Parameters
handleThe client handle associated with this transfer
user_specificUser argument passed to globus_ftp_client_throughput_plugin_init
bytesThe total number of bytes received on all stripes
instantaneous_throughputTotal instanteous throughput on all stripes (bytes / sec)
avg_throughputAverage total throughput on all stripes (bytes / sec)
typedef void*(* globus_ftp_client_throughput_plugin_user_copy_cb_t)(void *user_specific)

Copy constructor

This callback will be called when a copy of this plugin is made, it is intended to allow initialization of a new user_specific data

Parameters
user_specificthis is user specific data either created by this copy method, or the value passed to init
Returns
  • a pointer to a user specific piece of data
  • GLOBUS_NULL (does not indicate error)
typedef void(* globus_ftp_client_throughput_plugin_user_destroy_cb_t)(void *user_specific)

Destructor

This callback will be called when a copy of this plugin is destroyed, it is intended to allow the user to free up any memory associated with the user specific data

Parameters
user_specificthis is user specific data created by the copy method
Returns
  • n/a

Function Documentation

globus_result_t globus_ftp_client_throughput_plugin_destroy ( globus_ftp_client_plugin_t plugin)

Destroy throughput plugin

Frees up memory associated with plugin

Parameters
pluginplugin previously initialized with init (above)
Returns
  • GLOBUS_SUCCESS
  • Error on NULL plugin
globus_result_t globus_ftp_client_throughput_plugin_get_user_specific ( globus_ftp_client_plugin_t plugin,
void **  user_specific 
)

Retrieve user specific pointer

Parameters
pluginplugin previously initialized with init (above)
user_specificpointer to storage for user_specific pointer
Returns
  • GLOBUS_SUCCESS
  • Error on NULL plugin
  • Error on NULL user_specific

Throughput plugin init

Use this function to initialize a throughput plugin. The throughput plugin sits on top of the perf_plugin. The only required param is 'plugin', all others may be GLOBUS_NULL

Parameters
plugina pointer to a plugin type to be initialized
begin_cbthe callback to be called upon the start of a transfer
per_stripe_cbthe callback to be called every time updated throughput info is available for a given stripe
total_cbthe callback to be called every time updated throughput info is available for any stripe
complete_cbthe callback to be called to indicate transfer completion
user_specifica pointer to some user specific data that will be provided to all callbacks
Returns
  • GLOBUS_SUCCESS
  • Error on NULL plugin
  • Error on init perf plugin
globus_result_t globus_ftp_client_throughput_plugin_set_copy_destroy ( globus_ftp_client_plugin_t plugin,
globus_ftp_client_throughput_plugin_user_copy_cb_t  copy_cb,
globus_ftp_client_throughput_plugin_user_destroy_cb_t  destroy_cb 
)

Set user copy and destroy callbacks

Use this to have the plugin make callbacks any time a copy of this plugin is being made. This will allow the user to keep state for different handles.

Parameters
pluginplugin previously initialized with init (above)
copy_cbfunc to be called when a copy is needed
destroy_cbfunc to be called when a copy is to be destroyed
Returns
  • Error on NULL arguments
  • GLOBUS_SUCCESS