---
name: "globus_ftp_client_throughput_plugin"
section: "3"
platform: "linux"
package: "libglobus-ftp-client-doc"
version: "9.8-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_ftp_client_throughput_plugin"
---

# globus\_ftp\_client\_throughput\_plugin(3)

Throughput Performance Plugin - Throughput Performance Plugin.

## NAME

globus\_ftp\_client\_throughput\_plugin - Throughput Performance Plugin

 \- Throughput Performance Plugin.

## SYNOPSIS

### 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**

*handle* The client handle associated with this transfer\
 *user\_specific* User argument passed to globus\_ftp\_client\_throughput\_plugin\_init\
 *source\_url* source of the transfer (GLOBUS\_NULL if 'put')\
 *dest\_url* dest 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**

*handle* The client handle associated with this transfer\
 *user\_specific* User argument passed to globus\_ftp\_client\_throughput\_plugin\_init\
 *success* indicates 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**

*handle* The client handle associated with this transfer\
 *user\_specific* User argument passed to globus\_ftp\_client\_throughput\_plugin\_init\
 *bytes* The total number of bytes received on this stripe\
 *instantaneous\_throughput* Instanteous throughput on this stripe (bytes / sec)\
 *avg\_throughput* Average throughput on this stripe (bytes / sec)\
 *stripe\_ndx* This 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**

*handle* The client handle associated with this transfer\
 *user\_specific* User argument passed to globus\_ftp\_client\_throughput\_plugin\_init\
 *bytes* The total number of bytes received on all stripes\
 *instantaneous\_throughput* Total instanteous throughput on all stripes (bytes / sec)\
 *avg\_throughput* Average 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\_specific* this 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\_specific* this 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**

*plugin* plugin 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**

*plugin* plugin previously initialized with init (above)\
 *user\_specific* pointer to storage for user\_specific pointer

**Returns**

- •

  GLOBUS\_SUCCESS

- •

  Error on NULL plugin

- •

  Error on NULL user\_specific

### 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)

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**

*plugin* a pointer to a plugin type to be initialized\
 *begin\_cb* the callback to be called upon the start of a transfer\
 *per\_stripe\_cb* the callback to be called every time updated throughput info is available for a given stripe\
 *total\_cb* the callback to be called every time updated throughput info is available for any stripe\
 *complete\_cb* the callback to be called to indicate transfer completion\
 *user\_specific* a 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**

*plugin* plugin previously initialized with init (above)\
 *copy\_cb* func to be called when a copy is needed\
 *destroy\_cb* func to be called when a copy is to be destroyed

**Returns**

- •

  Error on NULL arguments

- •

  GLOBUS\_SUCCESS

## Author

Generated automatically by Doxygen for globus\_ftp\_client from the source code.
