libpressio 0.93.0
|
Metrics facilities to introspect compressor functions, input, and output. More...
Go to the source code of this file.
Metrics facilities to introspect compressor functions, input, and output.
struct pressio_metrics * pressio_metrics_clone | ( | struct pressio_metrics * | metrics | ) |
Clones a pressio_metrics object and its configuration
[in] | metrics | the metrics object to clone |
struct pressio_options * pressio_metrics_evaluate | ( | struct pressio_metrics * | metrics, |
struct pressio_data const * | uncompressed, | ||
struct pressio_data const * | compressed, | ||
struct pressio_data const * | decompressed | ||
) |
Evaluate a metric that operates on a data buffer and return a corresponding options structure
If the metric does not support being called on data buffers, the returned object is undefined.
[in] | metrics | the metrics object to invoke |
[in] | uncompressed | the data before compression, if nullptr, begin/end_compress_impl will not be called |
[in] | compressed | the data after compression, if nullptr, the metrics object MAY choose not to compute some or all metrics, but SHOULD compute as many as possible |
[in] | decompressed | the data after decompression, if nullptr, begin/end_decompress_impl will not be called |
void pressio_metrics_free | ( | struct pressio_metrics * | metrics | ) |
frees a metrics structure
[in] | metrics | the metrics structure to free |
struct pressio_options * pressio_metrics_get_configuration | ( | struct pressio_metrics const * | metrics | ) |
Gets the configuration for a metrics structure
[in] | metrics | the metrics structure to get configuration for |
struct pressio_options * pressio_metrics_get_documentation | ( | struct pressio_metrics const * | metrics | ) |
Gets the documentation for a metrics structure
[in] | metrics | the metrics structure to get documentation for |
const char * pressio_metrics_get_name | ( | struct pressio_metrics const * | metrics | ) |
Get the name of a metrics
[in] | metrics | the metrics to get the name of |
struct pressio_options * pressio_metrics_get_options | ( | struct pressio_metrics const * | metrics | ) |
Gets the options for a metrics structure
[in] | metrics | the metrics structure to get options for |
struct pressio_options * pressio_metrics_get_results | ( | struct pressio_metrics const * | metrics | ) |
Gets the results from a metrics structure
[in] | metrics | the metrics structure to get results from |
void pressio_metrics_set_name | ( | struct pressio_metrics * | metrics, |
const char * | new_name | ||
) |
Assign a new name to a metrics. Names are used to prefix options in meta-metrics.
sub-metrics will be renamed either by the of the sub-metricss prefix or by the $prefix:name configuration option
i.e. for some new_name and a metrics with prefix foo and submetricss with prefixs "abc", "def", "ghi" respectively
[in] | metrics | the metrics to get the name of |
[in] | new_name | the name to set |
int pressio_metrics_set_options | ( | struct pressio_metrics const * | metrics, |
struct pressio_options const * | options | ||
) |
Gets the options for a metrics structure
[in] | metrics | the metrics structure to get options for |
[in] | options | the to set |