AT&T ECOMP Vendor Event Listener library
0.1
|
Implementation of EVEL functions relating to the Measurement. More...
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "evel.h"
#include "evel_internal.h"
#include "evel_throttle.h"
Go to the source code of this file.
Functions | |
EVENT_MEASUREMENT * | evel_new_measurement (double measurement_interval) |
Create a new Measurement event. More... | |
void | evel_measurement_type_set (EVENT_MEASUREMENT *measurement, const char *const type) |
Set the Event Type property of the Measurement. More... | |
void | evel_measurement_conc_sess_set (EVENT_MEASUREMENT *measurement, int concurrent_sessions) |
Set the Concurrent Sessions property of the Measurement. More... | |
void | evel_measurement_cfg_ents_set (EVENT_MEASUREMENT *measurement, int configured_entities) |
Set the Configured Entities property of the Measurement. More... | |
void | evel_measurement_errors_set (EVENT_MEASUREMENT *measurement, int receive_discards, int receive_errors, int transmit_discards, int transmit_errors) |
Add an additional set of Errors to the Measurement. More... | |
void | evel_measurement_mean_req_lat_set (EVENT_MEASUREMENT *measurement, double mean_request_latency) |
Set the Mean Request Latency property of the Measurement. More... | |
void | evel_measurement_mem_cfg_set (EVENT_MEASUREMENT *measurement, double memory_configured) |
Set the Memory Configured property of the Measurement. More... | |
void | evel_measurement_mem_used_set (EVENT_MEASUREMENT *measurement, double memory_used) |
Set the Memory Used property of the Measurement. More... | |
void | evel_measurement_request_rate_set (EVENT_MEASUREMENT *measurement, int request_rate) |
Set the Request Rate property of the Measurement. More... | |
void | evel_measurement_cpu_use_add (EVENT_MEASUREMENT *measurement, char *id, double usage) |
Add an additional CPU usage value name/value pair to the Measurement. More... | |
void | evel_measurement_fsys_use_add (EVENT_MEASUREMENT *measurement, char *filesystem_name, double block_configured, double block_used, int block_iops, double ephemeral_configured, double ephemeral_used, int ephemeral_iops) |
Add an additional File System usage value name/value pair to the Measurement. More... | |
void | evel_measurement_feature_use_add (EVENT_MEASUREMENT *measurement, char *feature, int utilization) |
Add a Feature usage value name/value pair to the Measurement. More... | |
void | evel_measurement_custom_measurement_add (EVENT_MEASUREMENT *measurement, const char *const group, const char *const name, const char *const value) |
Add a Additional Measurement value name/value pair to the Report. More... | |
void | evel_measurement_codec_use_add (EVENT_MEASUREMENT *measurement, char *codec, int utilization) |
Add a Codec usage value name/value pair to the Measurement. More... | |
void | evel_measurement_agg_cpu_use_set (EVENT_MEASUREMENT *measurement, double cpu_use) |
Set the Aggregate CPU Use property of the Measurement. More... | |
void | evel_measurement_media_port_use_set (EVENT_MEASUREMENT *measurement, int media_ports_in_use) |
Set the Media Ports in Use property of the Measurement. More... | |
void | evel_measurement_vnfc_scaling_metric_set (EVENT_MEASUREMENT *measurement, double scaling_metric) |
Set the VNFC Scaling Metric property of the Measurement. More... | |
MEASUREMENT_LATENCY_BUCKET * | evel_new_meas_latency_bucket (const int count) |
Create a new Latency Bucket to be added to a Measurement event. More... | |
void | evel_meas_latency_bucket_high_end_set (MEASUREMENT_LATENCY_BUCKET *const bucket, const double high_end) |
Set the High End property of the Measurement Latency Bucket. More... | |
void | evel_meas_latency_bucket_low_end_set (MEASUREMENT_LATENCY_BUCKET *const bucket, const double low_end) |
Set the Low End property of the Measurement Latency Bucket. More... | |
void | evel_meas_latency_bucket_add (EVENT_MEASUREMENT *const measurement, MEASUREMENT_LATENCY_BUCKET *const bucket) |
Add an additional Measurement Latency Bucket to the specified event. More... | |
void | evel_measurement_latency_add (EVENT_MEASUREMENT *const measurement, const double low_end, const double high_end, const int count) |
Add an additional Latency Distribution bucket to the Measurement. More... | |
MEASUREMENT_VNIC_USE * | evel_new_measurement_vnic_use (char *const vnic_id, const int packets_in, const int packets_out, const int bytes_in, const int bytes_out) |
Create a new vNIC Use to be added to a Measurement event. More... | |
void | evel_free_measurement_vnic_use (MEASUREMENT_VNIC_USE *const vnic_use) |
Free a vNIC Use. More... | |
void | evel_vnic_use_bcast_pkt_in_set (MEASUREMENT_VNIC_USE *const vnic_use, const int broadcast_packets_in) |
Set the Broadcast Packets Received property of the vNIC Use. More... | |
void | evel_vnic_use_bcast_pkt_out_set (MEASUREMENT_VNIC_USE *const vnic_use, const int broadcast_packets_out) |
Set the Broadcast Packets Transmitted property of the vNIC Use. More... | |
void | evel_vnic_use_mcast_pkt_in_set (MEASUREMENT_VNIC_USE *const vnic_use, const int multicast_packets_in) |
Set the Multicast Packets Received property of the vNIC Use. More... | |
void | evel_vnic_use_mcast_pkt_out_set (MEASUREMENT_VNIC_USE *const vnic_use, const int multicast_packets_out) |
Set the Multicast Packets Transmitted property of the vNIC Use. More... | |
void | evel_vnic_use_ucast_pkt_in_set (MEASUREMENT_VNIC_USE *const vnic_use, const int unicast_packets_in) |
Set the Unicast Packets Received property of the vNIC Use. More... | |
void | evel_vnic_use_ucast_pkt_out_set (MEASUREMENT_VNIC_USE *const vnic_use, const int unicast_packets_out) |
Set the Unicast Packets Transmitted property of the vNIC Use. More... | |
void | evel_meas_vnic_use_add (EVENT_MEASUREMENT *const measurement, MEASUREMENT_VNIC_USE *const vnic_use) |
Add an additional vNIC Use to the specified Measurement event. More... | |
void | evel_measurement_vnic_use_add (EVENT_MEASUREMENT *const measurement, char *const vnic_id, const int packets_in, const int packets_out, const int broadcast_packets_in, const int broadcast_packets_out, const int bytes_in, const int bytes_out, const int multicast_packets_in, const int multicast_packets_out, const int unicast_packets_in, const int unicast_packets_out) |
Add an additional vNIC usage record Measurement. More... | |
void | evel_json_encode_measurement (EVEL_JSON_BUFFER *jbuf, EVENT_MEASUREMENT *event) |
Encode the measurement as a JSON measurement. More... | |
void | evel_free_measurement (EVENT_MEASUREMENT *event) |
Free a Measurement. More... | |
Implementation of EVEL functions relating to the Measurement.
Copyright(c) <2016>, AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY AT&T INTELLECTUAL PROPERTY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AT&T INTELLECTUAL PROPERTY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file evel_scaling_measurement.c.
void evel_free_measurement | ( | EVENT_MEASUREMENT * | event | ) |
Free a Measurement.
Free off the Measurement supplied. Will free all the contained allocated memory.
Definition at line 1607 of file evel_scaling_measurement.c.
void evel_free_measurement_vnic_use | ( | MEASUREMENT_VNIC_USE *const | vnic_use | ) |
Free a vNIC Use.
Free off the MEASUREMENT_VNIC_USE supplied. Will free all the contained allocated memory.
Definition at line 955 of file evel_scaling_measurement.c.
void evel_json_encode_measurement | ( | EVEL_JSON_BUFFER * | jbuf, |
EVENT_MEASUREMENT * | event | ||
) |
Encode the measurement as a JSON measurement.
jbuf | Pointer to the EVEL_JSON_BUFFER to encode into. |
event | Pointer to the EVENT_HEADER to encode. |
Definition at line 1225 of file evel_scaling_measurement.c.
void evel_meas_latency_bucket_add | ( | EVENT_MEASUREMENT *const | measurement, |
MEASUREMENT_LATENCY_BUCKET *const | bucket | ||
) |
Add an additional Measurement Latency Bucket to the specified event.
measurement | Pointer to the Measurement event. |
bucket | Pointer to the Measurement Latency Bucket to add. |
Definition at line 834 of file evel_scaling_measurement.c.
void evel_meas_latency_bucket_high_end_set | ( | MEASUREMENT_LATENCY_BUCKET *const | bucket, |
const double | high_end | ||
) |
Set the High End property of the Measurement Latency Bucket.
bucket | Pointer to the Measurement Latency Bucket. |
high_end | High end of the bucket's range. |
Definition at line 789 of file evel_scaling_measurement.c.
void evel_meas_latency_bucket_low_end_set | ( | MEASUREMENT_LATENCY_BUCKET *const | bucket, |
const double | low_end | ||
) |
Set the Low End property of the Measurement Latency Bucket.
bucket | Pointer to the Measurement Latency Bucket. |
low_end | Low end of the bucket's range. |
Definition at line 814 of file evel_scaling_measurement.c.
void evel_meas_vnic_use_add | ( | EVENT_MEASUREMENT *const | measurement, |
MEASUREMENT_VNIC_USE *const | vnic_use | ||
) |
Add an additional vNIC Use to the specified Measurement event.
measurement | Pointer to the measurement. |
vnic_use | Pointer to the vNIC Use to add. |
Definition at line 1148 of file evel_scaling_measurement.c.
void evel_measurement_agg_cpu_use_set | ( | EVENT_MEASUREMENT * | measurement, |
double | cpu_use | ||
) |
Set the Aggregate CPU Use property of the Measurement.
} Set the Aggregate CPU Use property of the Measurement.
measurement | Pointer to the measurement. |
cpu_use | The CPU use to set. |
Definition at line 656 of file evel_scaling_measurement.c.
void evel_measurement_cfg_ents_set | ( | EVENT_MEASUREMENT * | measurement, |
int | configured_entities | ||
) |
Set the Configured Entities property of the Measurement.
measurement | Pointer to the Measurement. |
configured_entities | The Configured Entities to be set. |
Definition at line 178 of file evel_scaling_measurement.c.
void evel_measurement_codec_use_add | ( | EVENT_MEASUREMENT * | measurement, |
char * | codec, | ||
int | utilization | ||
) |
Add a Codec usage value name/value pair to the Measurement.
The name is null delimited ASCII string. The library takes a copy so the caller does not have to preserve values after the function returns.
measurement | Pointer to the measurement. |
codec | ASCIIZ string with the codec's name. |
utilization | Number of codecs in use. |
Definition at line 615 of file evel_scaling_measurement.c.
void evel_measurement_conc_sess_set | ( | EVENT_MEASUREMENT * | measurement, |
int | concurrent_sessions | ||
) |
Set the Concurrent Sessions property of the Measurement.
measurement | Pointer to the Measurement. |
concurrent_sessions | The Concurrent Sessions to be set. |
Definition at line 150 of file evel_scaling_measurement.c.
void evel_measurement_cpu_use_add | ( | EVENT_MEASUREMENT * | measurement, |
char * | id, | ||
double | usage | ||
) |
Add an additional CPU usage value name/value pair to the Measurement.
The name and value are null delimited ASCII strings. The library takes a copy so the caller does not have to preserve values after the function returns.
measurement | Pointer to the measurement. |
id | ASCIIZ string with the CPU's identifier. |
usage | CPU utilization. |
Definition at line 385 of file evel_scaling_measurement.c.
void evel_measurement_custom_measurement_add | ( | EVENT_MEASUREMENT * | measurement, |
const char *const | group, | ||
const char *const | name, | ||
const char *const | value | ||
) |
Add a Additional Measurement value name/value pair to the Report.
Add a Additional Measurement value name/value pair to the Measurement.
The name is null delimited ASCII string. The library takes a copy so the caller does not have to preserve values after the function returns.
measurement | Pointer to the Measaurement. |
group | ASCIIZ string with the measurement group's name. |
name | ASCIIZ string containing the measurement's name. |
value | ASCIIZ string containing the measurement's value. |
Definition at line 531 of file evel_scaling_measurement.c.
void evel_measurement_errors_set | ( | EVENT_MEASUREMENT * | measurement, |
int | receive_discards, | ||
int | receive_errors, | ||
int | transmit_discards, | ||
int | transmit_errors | ||
) |
Add an additional set of Errors to the Measurement.
measurement | Pointer to the measurement. |
receive_discards | The number of receive discards. |
receive_errors | The number of receive errors. |
transmit_discards | The number of transmit discards. |
transmit_errors | The number of transmit errors. |
Definition at line 209 of file evel_scaling_measurement.c.
void evel_measurement_feature_use_add | ( | EVENT_MEASUREMENT * | measurement, |
char * | feature, | ||
int | utilization | ||
) |
Add a Feature usage value name/value pair to the Measurement.
The name is null delimited ASCII string. The library takes a copy so the caller does not have to preserve values after the function returns.
measurement | Pointer to the measurement. |
feature | ASCIIZ string with the feature's name. |
utilization | Utilization of the feature. |
Definition at line 488 of file evel_scaling_measurement.c.
void evel_measurement_fsys_use_add | ( | EVENT_MEASUREMENT * | measurement, |
char * | filesystem_name, | ||
double | block_configured, | ||
double | block_used, | ||
int | block_iops, | ||
double | ephemeral_configured, | ||
double | ephemeral_used, | ||
int | ephemeral_iops | ||
) |
Add an additional File System usage value name/value pair to the Measurement.
The filesystem_name is null delimited ASCII string. The library takes a copy so the caller does not have to preserve values after the function returns.
measurement | Pointer to the measurement. |
filesystem_name | ASCIIZ string with the file-system's UUID. |
block_configured | Block storage configured. |
block_used | Block storage in use. |
block_iops | Block storage IOPS. |
ephemeral_configured | Ephemeral storage configured. |
ephemeral_used | Ephemeral storage in use. |
ephemeral_iops | Ephemeral storage IOPS. |
Definition at line 432 of file evel_scaling_measurement.c.
void evel_measurement_latency_add | ( | EVENT_MEASUREMENT *const | measurement, |
const double | low_end, | ||
const double | high_end, | ||
const int | count | ||
) |
Add an additional Latency Distribution bucket to the Measurement.
This function implements the previous API, purely for convenience.
measurement | Pointer to the measurement. |
low_end | Low end of the bucket's range. |
high_end | High end of the bucket's range. |
count | Count of events in this bucket. |
Definition at line 860 of file evel_scaling_measurement.c.
void evel_measurement_mean_req_lat_set | ( | EVENT_MEASUREMENT * | measurement, |
double | mean_request_latency | ||
) |
Set the Mean Request Latency property of the Measurement.
measurement | Pointer to the Measurement. |
mean_request_latency | The Mean Request Latency to be set. |
Definition at line 272 of file evel_scaling_measurement.c.
void evel_measurement_media_port_use_set | ( | EVENT_MEASUREMENT * | measurement, |
int | media_ports_in_use | ||
) |
Set the Media Ports in Use property of the Measurement.
measurement | Pointer to the measurement. |
media_ports_in_use | The media port usage to set. |
Definition at line 684 of file evel_scaling_measurement.c.
void evel_measurement_mem_cfg_set | ( | EVENT_MEASUREMENT * | measurement, |
double | memory_configured | ||
) |
Set the Memory Configured property of the Measurement.
measurement | Pointer to the Measurement. |
memory_configured | The Memory Configured to be set. |
Definition at line 300 of file evel_scaling_measurement.c.
void evel_measurement_mem_used_set | ( | EVENT_MEASUREMENT * | measurement, |
double | memory_used | ||
) |
Set the Memory Used property of the Measurement.
measurement | Pointer to the Measurement. |
memory_used | The Memory Used to be set. |
Definition at line 328 of file evel_scaling_measurement.c.
void evel_measurement_request_rate_set | ( | EVENT_MEASUREMENT * | measurement, |
int | request_rate | ||
) |
Set the Request Rate property of the Measurement.
measurement | Pointer to the Measurement. |
request_rate | The Request Rate to be set. |
Definition at line 356 of file evel_scaling_measurement.c.
void evel_measurement_type_set | ( | EVENT_MEASUREMENT * | measurement, |
const char *const | type | ||
) |
Set the Event Type property of the Measurement.
measurement | Pointer to the Measurement. |
type | The Event Type to be set. ASCIIZ string. The caller does not need to preserve the value once the function returns. |
Definition at line 125 of file evel_scaling_measurement.c.
void evel_measurement_vnfc_scaling_metric_set | ( | EVENT_MEASUREMENT * | measurement, |
double | scaling_metric | ||
) |
Set the VNFC Scaling Metric property of the Measurement.
measurement | Pointer to the measurement. |
scaling_metric | The scaling metric to set. |
Definition at line 712 of file evel_scaling_measurement.c.
void evel_measurement_vnic_use_add | ( | EVENT_MEASUREMENT *const | measurement, |
char *const | vnic_id, | ||
const int | packets_in, | ||
const int | packets_out, | ||
const int | broadcast_packets_in, | ||
const int | broadcast_packets_out, | ||
const int | bytes_in, | ||
const int | bytes_out, | ||
const int | multicast_packets_in, | ||
const int | multicast_packets_out, | ||
const int | unicast_packets_in, | ||
const int | unicast_packets_out | ||
) |
Add an additional vNIC usage record Measurement.
This function implements the previous API, purely for convenience.
The ID is null delimited ASCII string. The library takes a copy so the caller does not have to preserve values after the function returns.
measurement | Pointer to the measurement. |
vnic_id | ASCIIZ string with the vNIC's ID. |
packets_in | Total packets received. |
packets_out | Total packets transmitted. |
broadcast_packets_in | Broadcast packets received. |
broadcast_packets_out | Broadcast packets transmitted. |
bytes_in | Total bytes received. |
bytes_out | Total bytes transmitted. |
multicast_packets_in | Multicast packets received. |
multicast_packets_out | Multicast packets transmitted. |
unicast_packets_in | Unicast packets received. |
unicast_packets_out | Unicast packets transmitted. |
Definition at line 1186 of file evel_scaling_measurement.c.
MEASUREMENT_LATENCY_BUCKET* evel_new_meas_latency_bucket | ( | const int | count | ) |
Create a new Latency Bucket to be added to a Measurement event.
count | Count of events in this bucket. |
NULL | Failed to create the Latency Bucket. |
Definition at line 745 of file evel_scaling_measurement.c.
EVENT_MEASUREMENT* evel_new_measurement | ( | double | measurement_interval | ) |
Create a new Measurement event.
measurement_interval |
NULL | Failed to create the event. |
Definition at line 60 of file evel_scaling_measurement.c.
MEASUREMENT_VNIC_USE* evel_new_measurement_vnic_use | ( | char *const | vnic_id, |
const int | packets_in, | ||
const int | packets_out, | ||
const int | bytes_in, | ||
const int | bytes_out | ||
) |
Create a new vNIC Use to be added to a Measurement event.
vnic_id | ASCIIZ string with the vNIC's ID. |
packets_in | Total packets received. |
packets_out | Total packets transmitted. |
bytes_in | Total bytes received. |
bytes_out | Total bytes transmitted. |
NULL | Failed to create the vNIC Use. |
Definition at line 900 of file evel_scaling_measurement.c.
void evel_vnic_use_bcast_pkt_in_set | ( | MEASUREMENT_VNIC_USE *const | vnic_use, |
const int | broadcast_packets_in | ||
) |
Set the Broadcast Packets Received property of the vNIC Use.
vnic_use | Pointer to the vNIC Use. |
broadcast_packets_in | Broadcast packets received. |
Definition at line 985 of file evel_scaling_measurement.c.
void evel_vnic_use_bcast_pkt_out_set | ( | MEASUREMENT_VNIC_USE *const | vnic_use, |
const int | broadcast_packets_out | ||
) |
Set the Broadcast Packets Transmitted property of the vNIC Use.
vnic_use | Pointer to the vNIC Use. |
broadcast_packets_out | Broadcast packets transmitted. |
Definition at line 1013 of file evel_scaling_measurement.c.
void evel_vnic_use_mcast_pkt_in_set | ( | MEASUREMENT_VNIC_USE *const | vnic_use, |
const int | multicast_packets_in | ||
) |
Set the Multicast Packets Received property of the vNIC Use.
vnic_use | Pointer to the vNIC Use. |
multicast_packets_in | Multicast packets received. |
Definition at line 1041 of file evel_scaling_measurement.c.
void evel_vnic_use_mcast_pkt_out_set | ( | MEASUREMENT_VNIC_USE *const | vnic_use, |
const int | multicast_packets_out | ||
) |
Set the Multicast Packets Transmitted property of the vNIC Use.
vnic_use | Pointer to the vNIC Use. |
multicast_packets_out | Multicast packets transmitted. |
Definition at line 1069 of file evel_scaling_measurement.c.
void evel_vnic_use_ucast_pkt_in_set | ( | MEASUREMENT_VNIC_USE *const | vnic_use, |
const int | unicast_packets_in | ||
) |
Set the Unicast Packets Received property of the vNIC Use.
vnic_use | Pointer to the vNIC Use. |
unicast_packets_in | Unicast packets received. |
Definition at line 1097 of file evel_scaling_measurement.c.
void evel_vnic_use_ucast_pkt_out_set | ( | MEASUREMENT_VNIC_USE *const | vnic_use, |
const int | unicast_packets_out | ||
) |
Set the Unicast Packets Transmitted property of the vNIC Use.
vnic_use | Pointer to the vNIC Use. |
unicast_packets_out | Unicast packets transmitted. |
Definition at line 1125 of file evel_scaling_measurement.c.