caikit.runtime.metrics.rpc_meter ================================ .. py:module:: caikit.runtime.metrics.rpc_meter Attributes ---------- .. autoapisummary:: caikit.runtime.metrics.rpc_meter.log Classes ------- .. autoapisummary:: caikit.runtime.metrics.rpc_meter.RPCMeter Module Contents --------------- .. py:data:: log .. py:class:: RPCMeter This class contains metering logic for RPC calls affiliated with the Caikit Runtime that are not a part of the Model Runtime proto definition. .. py:attribute:: predict_rpc_counter :value: [] .. py:attribute:: logs_writer_thread .. py:attribute:: metering_event .. py:attribute:: rpc_counter_lock .. py:attribute:: write_file_lock .. py:attribute:: metrics_dir .. py:attribute:: unique_id :value: '' .. py:attribute:: file_path .. py:method:: update_metrics(model_type) 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 .. py:method:: end_writer_thread() Kills log writer thread .. py:method:: flush_metrics() Writes metrics and kills log writer thread .. py:method:: write_metrics() Function for log writer thread to write logs at specific intervals configured by user .. py:method:: _write_metrics() Writes all metrics to directory specified in config and resets counters .. py:method:: __del__()