GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_COMPLETE_CB_T(3)

๐Ÿ“ฆ
version 9.9 ยท 6 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

๐Ÿ’– globus_ftp_client_throughput_plugin โ€” Throughput Performance Plugin ๐Ÿ’–

okay bestie, sit down, because this is the globus_ftp_client_throughput_plugin page from the globus_ftp_client manual (section 3, library functions, you know the vibe) and it's literally a whole plugin for watching your FTP transfers go zoom. ๐Ÿฆ‹


โœจ NAME โœจ

globus_ftp_client_throughput_plugin โ€” Throughput Performance Plugin

Throughput Performance Plugin. (yes it says it twice, it's that iconic)


๐ŸŒธ 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 lets you get calculated performance info for basically every kind of transfer โ€” EXCEPT a third party transfer where Extended Block mode is not enabled. so like, not that one, sorry babe. ๐Ÿ˜ญ

๐Ÿ’€ Note, and this one MATTERS: since this plugin is built on top of the Performance Marker Plugin, you literally cannot associate both plugins with a handle. pick a lane bestie, the handle can only hold one.

๐ŸŽ€ Macro Definition Documentation ๐ŸŽ€

#define GLOBUS_FTP_CLIENT_THROUGHPUT_PLUGIN_MODULE

(&globus_i_ftp_client_throughput_plugin_module)

Module descriptor. that's it, that's the whole thing. iconic minimalism. ๐Ÿ’…


๐ŸŒˆ 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 one gets called when a transfer begins. like the opening credits.

Parameters

  • handle โ€” the client handle associated with this transfer
  • user_specific โ€” the user argument you passed to globus_ftp_client_throughput_plugin_init
  • source_url โ€” source of the transfer (GLOBUS_NULL if it's a 'put')
  • dest_url โ€” dest of the transfer (GLOBUS_NULL if it's a '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 ๐Ÿ

Called upon transfer completion โ€” successful or otherwise, so no pretending it always went great.

Parameters

  • handle โ€” the client handle associated with this transfer
  • user_specific โ€” the user argument you passed to globus_ftp_client_throughput_plugin_init
  • success โ€” indicates whether this transfer completed successfully or got 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 gets called with every performance callback the perf plugin receives. the first callback for each stripe_ndx has an instantaneous_throughput based from the time the command was sent. no cap.

Parameters

  • handle โ€” the client handle associated with this transfer
  • user_specific โ€” the user argument you 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 ๐Ÿงฎ

Called with every performance callback the perf plugin receives too. the first callback will have an instantaneous_throughput based from the time the command was sent. and listen โ€” this callback gets called after the per_stripe_cb. order matters, periodt.

Parameters

  • handle โ€” the client handle associated with this transfer
  • user_specific โ€” the user argument you 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 ๐Ÿงฌ

Called when a copy of this plugin is made. it's intended to let you initialize a new user_specific blob of data. fresh start, new you.

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 (and btw, that does not indicate error)

typedef void(* globus_ftp_client_throughput_plugin_user_destroy_cb_t) (void *user_specific)

Destructor ๐Ÿ—‘๏ธ

Called when a copy of this plugin is destroyed. intended to let you free up any memory hanging around with the user specific data. clean up after yourself bestie.

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 the 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 to initialize a throughput plugin. the throughput plugin sits on top of the perf_plugin. the only required param is plugin โ€” all the others may be GLOBUS_NULL. yes really, everything else is optional, go feral.

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 lets you keep state for different handles โ€” very main character of you honestly.

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. (so like, don't blame a human for the formatting, it was the robot ๐Ÿ’€)


and that's the whole page bestie!! this came straight from globus_ftp_client, Version 9.9, living at globus_ftp...hput_plugin(3). go forth and measure those bytes per second. ๐Ÿฆ‹โœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from