caikit.runtime.metrics.rpc_meter

Attributes

log

Classes

RPCMeter

This class contains metering logic for RPC calls affiliated with the Caikit Runtime that are

Module Contents

caikit.runtime.metrics.rpc_meter.log[source]
class caikit.runtime.metrics.rpc_meter.RPCMeter[source]

This class contains metering logic for RPC calls affiliated with the Caikit Runtime that are not a part of the Model Runtime proto definition.

predict_rpc_counter = []
logs_writer_thread
metering_event
rpc_counter_lock
write_file_lock
metrics_dir
unique_id = ''
file_path
update_metrics(model_type)[source]

Updates metrics, writes to file if max count has reached and resets counters Args:

model_type (string): Type of model the request was made for

end_writer_thread()[source]

Kills log writer thread

flush_metrics()[source]

Writes metrics and kills log writer thread

write_metrics()[source]

Function for log writer thread to write logs at specific intervals configured by user

_write_metrics()[source]

Writes all metrics to directory specified in config and resets counters

__del__()[source]