libpressio 0.93.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
libpressio_metrics_plugin Class Referenceabstract

#include <metrics.h>

Inheritance diagram for libpressio_metrics_plugin:
Inheritance graph
[legend]
Collaboration diagram for libpressio_metrics_plugin:
Collaboration graph
[legend]

Public Member Functions

 libpressio_metrics_plugin ()
 
virtual ~libpressio_metrics_plugin ()=default
 
int begin_check_options (struct pressio_options const *options)
 
int end_check_options (struct pressio_options const *options, int rc)
 
int begin_get_options ()
 
int end_get_options (struct pressio_options const *ret)
 
int begin_get_documentation ()
 
int end_get_documentation (struct pressio_options const &ret)
 
int begin_get_configuration ()
 
int end_get_configuration (struct pressio_options const &ret)
 
int begin_set_options (struct pressio_options const &options)
 
int end_set_options (struct pressio_options const &options, int rc)
 
int begin_compress (const struct pressio_data *input, struct pressio_data const *output)
 
int end_compress (struct pressio_data const *input, pressio_data const *output, int rc)
 
int begin_decompress (struct pressio_data const *input, pressio_data const *output)
 
int end_decompress (struct pressio_data const *input, pressio_data const *output, int rc)
 
int begin_compress_many (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs)
 
int end_compress_many (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs, int rc)
 
int begin_decompress_many (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs)
 
int end_decompress_many (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs, int rc)
 
virtual pressio_options get_documentation_impl () const =0
 
virtual pressio_options get_documentation () const final
 
void set_name (std::string const &new_name) override final
 
virtual pressio_options get_metrics_results (pressio_options const &options)=0
 
virtual std::unique_ptr< libpressio_metrics_pluginclone ()=0
 
- Public Member Functions inherited from pressio_configurable
virtual const char * prefix () const =0
 
std::string const & get_name () const
 
virtual void set_name (std::string const &new_name)
 
virtual void set_name_impl (std::string const &new_name)
 
virtual struct pressio_options get_configuration () const
 
virtual struct pressio_options get_documentation () const
 
virtual int check_options (struct pressio_options const &)
 
virtual struct pressio_options get_options () const
 
virtual int set_options (struct pressio_options const &options)
 
int cast_options (pressio_options const &early_config, pressio_options const &config)
 
- Public Member Functions inherited from pressio_errorable
const char * error_msg () const
 
int error_code () const
 

Protected Member Functions

virtual int begin_check_options_impl (struct pressio_options const *options)
 
virtual int end_check_options_impl (struct pressio_options const *options, int rc)
 
virtual int begin_get_options_impl ()
 
virtual int end_get_options_impl (struct pressio_options const *ret)
 
virtual int begin_get_documentation_impl ()
 
virtual int end_get_documentation_impl (struct pressio_options const &ret)
 
virtual int begin_get_configuration_impl ()
 
virtual int end_get_configuration_impl (struct pressio_options const &ret)
 
virtual int begin_set_options_impl (struct pressio_options const &options)
 
virtual int end_set_options_impl (struct pressio_options const &options, int rc)
 
virtual int begin_compress_impl (const struct pressio_data *input, struct pressio_data const *output)
 
virtual int end_compress_impl (struct pressio_data const *input, pressio_data const *output, int rc)
 
virtual int begin_decompress_impl (struct pressio_data const *input, pressio_data const *output)
 
virtual int end_decompress_impl (struct pressio_data const *input, pressio_data const *output, int rc)
 
virtual int begin_compress_many_impl (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs)
 
virtual int end_compress_many_impl (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs, int rc)
 
virtual int begin_decompress_many_impl (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs)
 
virtual int end_decompress_many_impl (compat::span< const pressio_data *const > const &inputs, compat::span< const pressio_data *const > const &outputs, int rc)
 
- Protected Member Functions inherited from pressio_configurable
template<class StringType >
void set (pressio_options &options, StringType const &key, pressio_option const &value) const
 
template<class StringType >
void set_type (pressio_options &options, StringType const &key, pressio_option_type type) const
 
template<class StringType , class PointerType >
enum pressio_options_key_status get (pressio_options const &options, StringType &&key, PointerType value) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta (pressio_options &options, StringType &&key, std::string const &current_id, Wrapper const &current_value, Args &&... args) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta_docs (pressio_options &options, StringType &&key, std::string const &docstring, Wrapper const &current_value, Args &&... args) const
 
template<class StringType , class Wrapper , class Registry , class... Args>
void set_meta_configuration (pressio_options &options, StringType &&key, Registry const &registry, Wrapper const &current_value) const
 
template<class StringType , class Wrapper , class Registry , class... Args>
void set_meta_many_configuration (pressio_options &options, StringType &&key, Registry const &registry, std::vector< Wrapper > const &current_values) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta_many_docs (pressio_options &options, StringType &&key, std::string const &docstring, std::vector< Wrapper > const &current_values, Args &&... args) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta_many (pressio_options &options, StringType &&key, std::vector< std::string > const &current_ids, std::vector< Wrapper > const &current_values, Args &&... args) const
 
template<class StringType , class Registry , class Wrapper >
pressio_options_key_status get_meta (pressio_options const &options, StringType &&key, Registry const &registry, std::string &current_id, Wrapper &current_value)
 
template<class StringType , class Registry , class Wrapper >
pressio_options_key_status get_meta_many (pressio_options const &options, StringType &&key, Registry const &registry, std::vector< std::string > &current_ids, std::vector< Wrapper > &current_values)
 
template<class T >
void set_names_many (std::string const &name, std::vector< T > &plugins, std::vector< std::string > const &names) const
 
std::string get_metrics_key_name () const
 
- Protected Member Functions inherited from pressio_errorable
int set_error (int code, std::string const &msg)
 
void clear_error ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from pressio_configurable
static pressio_thread_safety get_threadsafe (pressio_configurable const &c)
 
- Protected Attributes inherited from pressio_configurable
std::string name
 

Detailed Description

plugin to collect metrics about compressors

Constructor & Destructor Documentation

◆ libpressio_metrics_plugin()

libpressio_metrics_plugin::libpressio_metrics_plugin ( )

default constructor

◆ ~libpressio_metrics_plugin()

virtual libpressio_metrics_plugin::~libpressio_metrics_plugin ( )
virtualdefault

destructor for inheritance

Member Function Documentation

◆ begin_check_options()

int libpressio_metrics_plugin::begin_check_options ( struct pressio_options const *  options)

called at the beginning of check_options

Parameters
[in]optionsthe value passed in to check_options

◆ begin_check_options_impl()

virtual int libpressio_metrics_plugin::begin_check_options_impl ( struct pressio_options const *  options)
protectedvirtual

called at the beginning of check_options

Parameters
[in]optionsthe value passed in to check_options

◆ begin_compress()

int libpressio_metrics_plugin::begin_compress ( const struct pressio_data input,
struct pressio_data const *  output 
)

called at the beginning of compress

Parameters
[in]inputthe value passed in to compress
[in]outputthe value passed in to compress

◆ begin_compress_impl()

virtual int libpressio_metrics_plugin::begin_compress_impl ( const struct pressio_data input,
struct pressio_data const *  output 
)
protectedvirtual

called at the beginning of compress

Parameters
[in]inputthe value passed in to compress
[in]outputthe value passed in to compress

◆ begin_compress_many()

int libpressio_metrics_plugin::begin_compress_many ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs 
)

called at the beginning of compress_many

◆ begin_compress_many_impl()

virtual int libpressio_metrics_plugin::begin_compress_many_impl ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs 
)
protectedvirtual

called at the beginning of compress_many

◆ begin_decompress()

int libpressio_metrics_plugin::begin_decompress ( struct pressio_data const *  input,
pressio_data const *  output 
)

called at the beginning of decompress

Parameters
[in]inputthe value passed in to decompress
[in]outputthe value passed in to decompress

◆ begin_decompress_impl()

virtual int libpressio_metrics_plugin::begin_decompress_impl ( struct pressio_data const *  input,
pressio_data const *  output 
)
protectedvirtual

called at the beginning of decompress

Parameters
[in]inputthe value passed in to decompress
[in]outputthe value passed in to decompress

◆ begin_decompress_many()

int libpressio_metrics_plugin::begin_decompress_many ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs 
)

called at the beginning of decompress_many

◆ begin_decompress_many_impl()

virtual int libpressio_metrics_plugin::begin_decompress_many_impl ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs 
)
protectedvirtual

called at the beginning of decompress_many

◆ begin_get_configuration()

int libpressio_metrics_plugin::begin_get_configuration ( )

called at the beginning of get_configuration

◆ begin_get_configuration_impl()

virtual int libpressio_metrics_plugin::begin_get_configuration_impl ( )
protectedvirtual

called at the beginning of get_configuration

◆ begin_get_documentation()

int libpressio_metrics_plugin::begin_get_documentation ( )

called at the beginning of get_configuration

◆ begin_get_documentation_impl()

virtual int libpressio_metrics_plugin::begin_get_documentation_impl ( )
protectedvirtual

called at the beginning of get_configuration

◆ begin_get_options()

int libpressio_metrics_plugin::begin_get_options ( )

called at the beginning of get_options

◆ begin_get_options_impl()

virtual int libpressio_metrics_plugin::begin_get_options_impl ( )
protectedvirtual

called at the beginning of get_options

◆ begin_set_options()

int libpressio_metrics_plugin::begin_set_options ( struct pressio_options const &  options)

called at the beginning of set_options

Parameters
[in]optionsthe value passed in to set_options

◆ begin_set_options_impl()

virtual int libpressio_metrics_plugin::begin_set_options_impl ( struct pressio_options const &  options)
protectedvirtual

called at the beginning of set_options

Parameters
[in]optionsthe value passed in to set_options

◆ clone()

virtual std::unique_ptr< libpressio_metrics_plugin > libpressio_metrics_plugin::clone ( )
pure virtual
Returns
a clone of the metric

◆ end_check_options()

int libpressio_metrics_plugin::end_check_options ( struct pressio_options const *  options,
int  rc 
)

called at the end of check_options

Parameters
[in]optionsthe value passed in to check_options
[in]rcthe return value from the underlying compressor check_options command

◆ end_check_options_impl()

virtual int libpressio_metrics_plugin::end_check_options_impl ( struct pressio_options const *  options,
int  rc 
)
protectedvirtual

called at the end of check_options

Parameters
[in]optionsthe value passed in to check_options
[in]rcthe return value from the underlying compressor check_options command

◆ end_compress()

int libpressio_metrics_plugin::end_compress ( struct pressio_data const *  input,
pressio_data const *  output,
int  rc 
)

called at the end of compress

Parameters
[in]inputthe value passed in to compress
[in]outputthe value passed in to compress
[in]rcthe return value from the underlying compressor compress command

◆ end_compress_impl()

virtual int libpressio_metrics_plugin::end_compress_impl ( struct pressio_data const *  input,
pressio_data const *  output,
int  rc 
)
protectedvirtual

called at the end of compress

Parameters
[in]inputthe value passed in to compress
[in]outputthe value passed in to compress
[in]rcthe return value from the underlying compressor compress command

◆ end_compress_many()

int libpressio_metrics_plugin::end_compress_many ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs,
int  rc 
)

called at the end of compress_many

◆ end_compress_many_impl()

virtual int libpressio_metrics_plugin::end_compress_many_impl ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs,
int  rc 
)
protectedvirtual

called at the end of compress_many

◆ end_decompress()

int libpressio_metrics_plugin::end_decompress ( struct pressio_data const *  input,
pressio_data const *  output,
int  rc 
)

called at the end of decompress

Parameters
[in]inputthe value passed in to decompress
[in]outputthe value passed in to decompress
[in]rcthe return value from the underlying compressor decompress command

◆ end_decompress_impl()

virtual int libpressio_metrics_plugin::end_decompress_impl ( struct pressio_data const *  input,
pressio_data const *  output,
int  rc 
)
protectedvirtual

called at the end of decompress

Parameters
[in]inputthe value passed in to decompress
[in]outputthe value passed in to decompress
[in]rcthe return value from the underlying compressor decompress command

◆ end_decompress_many()

int libpressio_metrics_plugin::end_decompress_many ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs,
int  rc 
)

called at the end of decompress_many

◆ end_decompress_many_impl()

virtual int libpressio_metrics_plugin::end_decompress_many_impl ( compat::span< const pressio_data *const > const &  inputs,
compat::span< const pressio_data *const > const &  outputs,
int  rc 
)
protectedvirtual

called at the end of decompress_many

◆ end_get_configuration()

int libpressio_metrics_plugin::end_get_configuration ( struct pressio_options const &  ret)

called at the end of get_configuration

Parameters
[in]retthe return value from the underlying compressor get_options command

◆ end_get_configuration_impl()

virtual int libpressio_metrics_plugin::end_get_configuration_impl ( struct pressio_options const &  ret)
protectedvirtual

called at the end of get_configuration

Parameters
[in]retthe return value from the underlying compressor get_options command

◆ end_get_documentation()

int libpressio_metrics_plugin::end_get_documentation ( struct pressio_options const &  ret)

called at the end of get_configuration

Parameters
[in]retthe return value from the underlying compressor get_options command

◆ end_get_documentation_impl()

virtual int libpressio_metrics_plugin::end_get_documentation_impl ( struct pressio_options const &  ret)
protectedvirtual

called at the end of get_configuration

Parameters
[in]retthe return value from the underlying compressor get_options command

◆ end_get_options()

int libpressio_metrics_plugin::end_get_options ( struct pressio_options const *  ret)

called at the end of get_options

Parameters
[in]retthe return value from the underlying compressor get_options command

◆ end_get_options_impl()

virtual int libpressio_metrics_plugin::end_get_options_impl ( struct pressio_options const *  ret)
protectedvirtual

called at the end of get_options

Parameters
[in]retthe return value from the underlying compressor get_options command

◆ end_set_options()

int libpressio_metrics_plugin::end_set_options ( struct pressio_options const &  options,
int  rc 
)

called at the end of set_options

Parameters
[in]optionsthe value passed in to set_options
[in]rcthe return value from the underlying compressor set_options command

◆ end_set_options_impl()

virtual int libpressio_metrics_plugin::end_set_options_impl ( struct pressio_options const &  options,
int  rc 
)
protectedvirtual

called at the end of set_options

Parameters
[in]optionsthe value passed in to set_options
[in]rcthe return value from the underlying compressor set_options command

◆ get_documentation()

virtual pressio_options libpressio_metrics_plugin::get_documentation ( ) const
finalvirtual

get documentation for the metrics module

Reimplemented from pressio_configurable.

◆ get_documentation_impl()

virtual pressio_options libpressio_metrics_plugin::get_documentation_impl ( ) const
pure virtual

called by metrics implementations to retrieve documentation

◆ get_metrics_results()

virtual pressio_options libpressio_metrics_plugin::get_metrics_results ( pressio_options const &  options)
pure virtual
Parameters
optionsthe metrics from the compressor plugin
Returns
a pressio_options structure containing the metrics returned by the provided metrics plugin

◆ set_name()

void libpressio_metrics_plugin::set_name ( std::string const &  new_name)
finaloverridevirtual

prohibit overriding set_name from child classes, override set_name_impl instead

Reimplemented from pressio_configurable.


The documentation for this class was generated from the following file: