---
name: "globus_ftp_client_perf_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_perf_plugin"
---

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

Performance Marker Plugin - Performance Marker Plugin.

## NAME

globus\_ftp\_client\_perf\_plugin - Performance Marker Plugin

 \- Performance Marker Plugin.

## SYNOPSIS

### Macros

\#define **GLOBUS\_FTP\_CLIENT\_PERF\_PLUGIN\_MODULE**   (&globus\_i\_ftp\_client\_perf\_plugin\_module)\

### Typedefs

typedef void(\* **globus\_ftp\_client\_perf\_plugin\_begin\_cb\_t**) (void \*user\_specific, **globus\_ftp\_client\_handle\_t** \*handle, const char \*source\_url, const char \*dest\_url, globus\_bool\_t restart)\
 typedef void(\* **globus\_ftp\_client\_perf\_plugin\_marker\_cb\_t**) (void \*user\_specific, **globus\_ftp\_client\_handle\_t** \*handle, time\_t time\_stamp\_int, char time\_stamp\_tenth, int stripe\_ndx, int num\_stripes, globus\_off\_t nbytes)\
 typedef void(\* **globus\_ftp\_client\_perf\_plugin\_complete\_cb\_t**) (void \*user\_specific, **globus\_ftp\_client\_handle\_t** \*handle, globus\_bool\_t success)\
 typedef void \*(\* **globus\_ftp\_client\_perf\_plugin\_user\_copy\_cb\_t**) (void \*user\_specific)\
 typedef void(\* **globus\_ftp\_client\_perf\_plugin\_user\_destroy\_cb\_t**) (void \*user\_specific)\

### Functions

globus\_result\_t **globus\_ftp\_client\_perf\_plugin\_init** (**globus\_ftp\_client\_plugin\_t** \*plugin, **globus\_ftp\_client\_perf\_plugin\_begin\_cb\_t** begin\_cb, **globus\_ftp\_client\_perf\_plugin\_marker\_cb\_t** marker\_cb, **globus\_ftp\_client\_perf\_plugin\_complete\_cb\_t** complete\_cb, void \*user\_specific)\
 globus\_result\_t **globus\_ftp\_client\_perf\_plugin\_set\_copy\_destroy** (**globus\_ftp\_client\_plugin\_t** \*plugin, **globus\_ftp\_client\_perf\_plugin\_user\_copy\_cb\_t** copy\_cb, **globus\_ftp\_client\_perf\_plugin\_user\_destroy\_cb\_t** destroy\_cb)\
 globus\_result\_t **globus\_ftp\_client\_perf\_plugin\_destroy** (**globus\_ftp\_client\_plugin\_t** \*plugin)\
 globus\_result\_t **globus\_ftp\_client\_perf\_plugin\_get\_user\_specific** (**globus\_ftp\_client\_plugin\_t** \*plugin, void \*\*user\_specific)\

## Detailed Description

Performance Marker Plugin.

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

These markers may be generated internally, or they may be received from a server ('put' or third\_party\_transfer' only).

Copy constructor and destructor callbacks are also provided to allow one to more easily layer other plugins on top of this one.

## Macro Definition Documentation

### #define GLOBUS\_FTP\_CLIENT\_PERF\_PLUGIN\_MODULE (&globus\_i\_ftp\_client\_perf\_plugin\_module)

Module descriptor

## Typedef Documentation

### typedef void(\* globus\_ftp\_client\_perf\_plugin\_begin\_cb\_t) (void \*user\_specific, globus\_ftp\_client\_handle\_t \*handle, const char \*source\_url, const char \*dest\_url, globus\_bool\_t restart)

Transfer begin callback

This callback is called when a get, put, or third party transfer is started. Note that it is possible for this callback to be made multiple times before ever receiving the complete callback... this would be the case if a transfer was restarted. The 'restart' will indicate whether or not we have been restarted.

**Parameters**

*handle* this the client handle that this transfer will be occurring on\
 *user\_specific* this is user specific data either created by the copy method, or, if a copy method was not specified, the value passed to init\
 *source\_url* source of the transfer (GLOBUS\_NULL if 'put')\
 *dest\_url* dest of the transfer (GLOBUS\_NULL if 'get')\
 *restart* boolean indicating whether this callback is result of a restart

**Returns**

- •

  n/a

### typedef void(\* globus\_ftp\_client\_perf\_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* this the client handle that this transfer was occurring on\
 *user\_specific* this is user specific data either created by the copy method, or, if a copy method was not specified, the value passed to init\
 *success* indicates whether this transfer completed successfully or was interrupted (by error or abort)

**Returns**

- •

  n/a

### typedef void(\* globus\_ftp\_client\_perf\_plugin\_marker\_cb\_t) (void \*user\_specific, globus\_ftp\_client\_handle\_t \*handle, time\_t time\_stamp\_int, char time\_stamp\_tenth, int stripe\_ndx, int num\_stripes, globus\_off\_t nbytes)

Performance marker received callback

This callback is called for all types of transfers except a third party in which extended block mode is not used (because 112 perf markers won't be sent in that case). For extended mode 'put' and '3pt', actual 112 perf markers will be used and the frequency of this callback is dependent upon the frequency those messages are received. For 'put' in which extended block mode is not enabled and 'get' transfers, the information in this callback will be determined locally and the frequency of this callback will be at a maximum of one per second.

**Parameters**

*handle* this the client handle that this transfer is occurring on\
 *user\_specific* this is user specific data either created by the copy method, or, if a copy method was not specified, the value passed to init\
 *time\_stamp\_int* the timestamp at which the number of bytes is valid (integer part)\
 *time\_stamp\_tenth* the timestamp at which the number of bytes is valid (tenth part)\
 *stripe\_ndx* the stripe index this data refers to\
 *num\_stripes* total number of stripes involved in this transfer\
 *nbytes* the total bytes transferred on this stripe

**Returns**

- •

  n/a

### typedef void \*(\* globus\_ftp\_client\_perf\_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\_perf\_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\_perf\_plugin\_destroy (globus\_ftp\_client\_plugin\_t \* plugin)

Destroy performance marker 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\_perf\_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\_perf\_plugin\_init (globus\_ftp\_client\_plugin\_t \* plugin, globus\_ftp\_client\_perf\_plugin\_begin\_cb\_t begin\_cb, globus\_ftp\_client\_perf\_plugin\_marker\_cb\_t marker\_cb, globus\_ftp\_client\_perf\_plugin\_complete\_cb\_t complete\_cb, void \* user\_specific)

Initialize a perf plugin

This function initializes a performance marker plugin. Any params except for the plugin may be GLOBUS\_NULL

**Parameters**

*plugin* a pointer to a plugin type to be initialized\
 *user\_specific* a pointer to some user specific data that will be provided to all callbacks\
 *begin\_cb* the callback to be called upon the start of a transfer\
 *marker\_cb* the callback to be called with every performance marker received\
 *complete\_cb* the callback to be called to indicate transfer completion

**Returns**

- •

  GLOBUS\_SUCCESS

- •

  Error on NULL plugin

- •

  Error on init internal plugin

### globus\_result\_t globus\_ftp\_client\_perf\_plugin\_set\_copy\_destroy (globus\_ftp\_client\_plugin\_t \* plugin, globus\_ftp\_client\_perf\_plugin\_user\_copy\_cb\_t copy\_cb, globus\_ftp\_client\_perf\_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.
